Przeglądaj źródła

Add (void *) casts for iovector assignments to remove compile warnings.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2270 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 16 lat temu
rodzic
commit
b8e3951ca1
13 zmienionych plików z 54 dodań i 52 usunięć
  1. 1 1
      exec/totemip.c
  2. 9 9
      exec/totemnet.c
  3. 10 9
      exec/totempg.c
  4. 2 1
      exec/totemsrp.c
  5. 11 11
      lib/cfg.c
  6. 5 5
      lib/cpg.c
  7. 5 5
      lib/evs.c
  8. 1 1
      services/cpg.c
  9. 1 1
      services/evs.c
  10. 2 2
      services/pload.c
  11. 3 3
      services/votequorum.c
  12. 2 2
      test/cpgverify.c
  13. 2 2
      test/evsverify.c

+ 1 - 1
exec/totemip.c

@@ -374,7 +374,7 @@ int totemip_iface_check(struct totem_ip_address *bindnet,
 			/*
 			 * Setup boundto output
 			 */
-			totemip_sockaddr_to_totemip_convert(sockaddr_in, boundto);
+			totemip_sockaddr_to_totemip_convert((struct sockaddr_storage *)sockaddr_in, boundto);
 			boundto->nodeid = sockaddr_in->sin_addr.s_addr;
 
 			if (ioctl(id_fd, SIOCGLIFFLAGS, &lifreq[i]) < 0) {

+ 9 - 9
exec/totemnet.c

@@ -261,7 +261,7 @@ static int authenticate_and_decrypt_sober (
 	unsigned int iov_len)
 {
 	unsigned char keys[48];
-	struct security_header *header = iov[0].iov_base;
+	struct security_header *header = (struct security_header *)iov[0].iov_base;
 	prng_state keygen_prng_state;
 	prng_state stream_prng_state;
 	unsigned char *hmac_key = &keys[32];
@@ -795,7 +795,7 @@ static int authenticate_and_decrypt (
 	unsigned int iov_len)
 {
 	unsigned char type;
-	unsigned char *endbuf = iov[iov_len-1].iov_base;
+	unsigned char *endbuf = (unsigned char *)iov[iov_len-1].iov_base;
 	int res = -1;
 
 	/*
@@ -909,7 +909,7 @@ static inline void ucast_sendmsg (
 	int addrlen;
 
 	if (instance->totem_config->secauth == 1) {
-		iovec_encrypt[0].iov_base = sheader;
+		iovec_encrypt[0].iov_base = (void *)sheader;
 		iovec_encrypt[0].iov_len = sizeof (struct security_header);
 		iovec_encrypt[1].iov_base = (void *)msg;
 		iovec_encrypt[1].iov_len = msg_len;
@@ -931,7 +931,7 @@ static inline void ucast_sendmsg (
 			encrypt_data[buf_len++] = 0;
 		}
 
-		iovec_encrypt[0].iov_base = encrypt_data;
+		iovec_encrypt[0].iov_base = (void *)encrypt_data;
 		iovec_encrypt[0].iov_len = buf_len;
 		iovec_sendmsg = &iovec_encrypt[0];
 		iov_len = 1;
@@ -988,7 +988,7 @@ static inline void mcast_sendmsg (
 
 	if (instance->totem_config->secauth == 1) {
 
-		iovec_encrypt[0].iov_base = sheader;
+		iovec_encrypt[0].iov_base = (void *)sheader;
 		iovec_encrypt[0].iov_len = sizeof (struct security_header);
 		iovec_encrypt[1].iov_base = (void *)msg;
 		iovec_encrypt[1].iov_len = msg_len;
@@ -1010,7 +1010,7 @@ static inline void mcast_sendmsg (
 			encrypt_data[buf_len++] = 0;
 		}
 
-		iovec_encrypt[0].iov_base = encrypt_data;
+		iovec_encrypt[0].iov_base = (void *)encrypt_data;
 		iovec_encrypt[0].iov_len = buf_len;
 		iovec_sendmsg = &iovec_encrypt[0];
 		iov_len = 1;
@@ -1077,7 +1077,7 @@ static void totemnet_mcast_worker_fn (void *thread_state, void *work_item_in)
 	int addrlen;
 
 	if (instance->totem_config->secauth == 1) {
-		iovec_enc[0].iov_base = sheader;
+		iovec_enc[0].iov_base = (void *)sheader;
 		iovec_enc[0].iov_len = sizeof (struct security_header);
 		iovec_enc[1].iov_base = (void *)work_item->msg;
 		iovec_enc[1].iov_len = work_item->msg_len;
@@ -1091,7 +1091,7 @@ static void totemnet_mcast_worker_fn (void *thread_state, void *work_item_in)
 			&buf_len,
 			iovec_enc, 2);
 
-		iovec.iov_base = totemnet_mcast_thread_state->iobuf;
+		iovec.iov_base = (void *)totemnet_mcast_thread_state->iobuf;
 		iovec.iov_len = buf_len;
 	} else {
 		iovec.iov_base = (void *)work_item->msg;
@@ -1233,7 +1233,7 @@ static int net_deliver_fn (
 			sizeof (struct security_header);
 		size_delv = bytes_received - sizeof (struct security_header);
 	} else {
-		msg_offset = iovec->iov_base;
+		msg_offset = (void *)iovec->iov_base;
 		size_delv = bytes_received;
 	}
 

+ 10 - 9
exec/totempg.c

@@ -84,6 +84,7 @@
 
 #include <config.h>
 
+#include <alloca.h>
 #include <netinet/in.h>
 #include <sys/uio.h>
 #include <stdio.h>
@@ -567,7 +568,7 @@ static void totempg_deliver_fn (
 	 */
 	msg_count = mcast->fragmented ? mcast->msg_count - 1 : mcast->msg_count;
 	continuation = mcast->continuation;
-	iov_delv.iov_base = &assembly->data[0];
+	iov_delv.iov_base = (void *)&assembly->data[0];
 	iov_delv.iov_len = assembly->index + msg_lens[0];
 
 	/*
@@ -588,7 +589,7 @@ static void totempg_deliver_fn (
 			assembly->throw_away_mode = THROW_AWAY_INACTIVE;
 
 			assembly->index += msg_lens[0];
-			iov_delv.iov_base = &assembly->data[assembly->index];
+			iov_delv.iov_base = (void *)&assembly->data[assembly->index];
 			iov_delv.iov_len = msg_lens[1];
 			start = 1;
 		}
@@ -600,7 +601,7 @@ static void totempg_deliver_fn (
 				app_deliver_fn(nodeid, iov_delv.iov_base, iov_delv.iov_len,
 					endian_conversion_required);
 				assembly->index += msg_lens[i];
-				iov_delv.iov_base = &assembly->data[assembly->index];
+				iov_delv.iov_base = (void *)&assembly->data[assembly->index];
 				if (i < (msg_count - 1)) {
 					iov_delv.iov_len = msg_lens[i + 1];
 				}
@@ -666,11 +667,11 @@ int callback_token_received_fn (enum totem_callback_token_type type,
 
 	mcast.msg_count = mcast_packed_msg_count;
 
-	iovecs[0].iov_base = &mcast;
+	iovecs[0].iov_base = (void *)&mcast;
 	iovecs[0].iov_len = sizeof (struct totempg_mcast);
-	iovecs[1].iov_base = mcast_packed_msg_lens;
+	iovecs[1].iov_base = (void *)mcast_packed_msg_lens;
 	iovecs[1].iov_len = mcast_packed_msg_count * sizeof (unsigned short);
-	iovecs[2].iov_base = &fragmentation_data[0];
+	iovecs[2].iov_base = (void *)&fragmentation_data[0];
 	iovecs[2].iov_len = fragment_size;
 	res = totemmrp_mcast (iovecs, 3, 0);
 
@@ -847,12 +848,12 @@ static int mcast_msg (
 			 * assemble the message and send it
 			 */
 			mcast.msg_count = ++mcast_packed_msg_count;
-			iovecs[0].iov_base = &mcast;
+			iovecs[0].iov_base = (void *)&mcast;
 			iovecs[0].iov_len = sizeof(struct totempg_mcast);
-			iovecs[1].iov_base = mcast_packed_msg_lens;
+			iovecs[1].iov_base = (void *)mcast_packed_msg_lens;
 			iovecs[1].iov_len = mcast_packed_msg_count *
 				sizeof(unsigned short);
-			iovecs[2].iov_base = data_ptr;
+			iovecs[2].iov_base = (void *)data_ptr;
 			iovecs[2].iov_len = max_packet_size;
 			assert (totemmrp_avail() > 0);
 			res = totemmrp_mcast (iovecs, 3, guarantee);

+ 2 - 1
exec/totemsrp.c

@@ -50,6 +50,7 @@
 #include <config.h>
 
 #include <assert.h>
+#include <alloca.h>
 #include <sys/mman.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -4022,7 +4023,7 @@ static int message_handler_memb_join (
 	int endian_conversion_needed)
 {
 	const struct memb_join *memb_join;
-	struct memb_join *memb_join_convert = alloca (msg_len);
+	struct memb_join *memb_join_convert = (struct memb_join *)alloca (msg_len);
 	int gather_entered;
 
 	if (endian_conversion_needed) {

+ 11 - 11
lib/cfg.c

@@ -288,7 +288,7 @@ corosync_cfg_ring_status_get (
 	req_lib_cfg_ringstatusget.header.size = sizeof (struct req_lib_cfg_ringstatusget);
 	req_lib_cfg_ringstatusget.header.id = MESSAGE_REQ_CFG_RINGSTATUSGET;
 
-	iov.iov_base = 	&req_lib_cfg_ringstatusget,
+	iov.iov_base = (void *)&req_lib_cfg_ringstatusget,
 	iov.iov_len = sizeof (struct req_lib_cfg_ringstatusget),
 
 	error = coroipcc_msg_send_reply_receive(cfg_instance->handle,
@@ -360,7 +360,7 @@ corosync_cfg_ring_reenable (
 	req_lib_cfg_ringreenable.header.size = sizeof (struct req_lib_cfg_ringreenable);
 	req_lib_cfg_ringreenable.header.id = MESSAGE_REQ_CFG_RINGREENABLE;
 
-	iov.iov_base = &req_lib_cfg_ringreenable,
+	iov.iov_base = (void *)&req_lib_cfg_ringreenable,
 	iov.iov_len = sizeof (struct req_lib_cfg_ringreenable);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -399,7 +399,7 @@ corosync_cfg_service_load (
 		sizeof (req_lib_cfg_serviceload.service_name) - 1);
 	req_lib_cfg_serviceload.service_ver = service_ver;
 
-	iov.iov_base = &req_lib_cfg_serviceload;
+	iov.iov_base = (void *)&req_lib_cfg_serviceload;
 	iov.iov_len = sizeof (req_lib_cfg_serviceload);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -438,7 +438,7 @@ corosync_cfg_service_unload (
 		sizeof (req_lib_cfg_serviceunload.service_name) - 1);
 	req_lib_cfg_serviceunload.service_ver = service_ver;
 
-	iov.iov_base = &req_lib_cfg_serviceunload;
+	iov.iov_base = (void *)&req_lib_cfg_serviceunload;
 	iov.iov_len = sizeof (req_lib_cfg_serviceunload);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -474,7 +474,7 @@ corosync_cfg_state_track (
 		return (error);
 	}
 
-	iov.iov_base = &req_lib_cfg_statetrack,
+	iov.iov_base = (void *)&req_lib_cfg_statetrack,
 	iov.iov_len = sizeof (struct req_lib_cfg_statetrack),
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -507,7 +507,7 @@ corosync_cfg_state_track_stop (
 	req_lib_cfg_statetrackstop.header.size = sizeof (struct req_lib_cfg_statetrackstop);
 	req_lib_cfg_statetrackstop.header.id = MESSAGE_REQ_CFG_STATETRACKSTOP;
 
-	iov.iov_base = &req_lib_cfg_statetrackstop,
+	iov.iov_base = (void *)&req_lib_cfg_statetrackstop,
 	iov.iov_len = sizeof (struct req_lib_cfg_statetrackstop),
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -548,7 +548,7 @@ corosync_cfg_kill_node (
 	strcpy((char *)req_lib_cfg_killnode.reason.value, reason);
 	req_lib_cfg_killnode.reason.length = strlen(reason)+1;
 
-	iov.iov_base = &req_lib_cfg_killnode;
+	iov.iov_base = (void *)&req_lib_cfg_killnode;
 	iov.iov_len = sizeof (struct req_lib_cfg_killnode);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -585,7 +585,7 @@ corosync_cfg_try_shutdown (
 	req_lib_cfg_tryshutdown.header.size = sizeof (struct req_lib_cfg_tryshutdown);
 	req_lib_cfg_tryshutdown.flags = flags;
 
-	iov.iov_base = &req_lib_cfg_tryshutdown;
+	iov.iov_base = (void *)&req_lib_cfg_tryshutdown;
 	iov.iov_len = sizeof (req_lib_cfg_tryshutdown);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -620,7 +620,7 @@ corosync_cfg_replyto_shutdown (
 	req_lib_cfg_replytoshutdown.header.size = sizeof (struct req_lib_cfg_replytoshutdown);
 	req_lib_cfg_replytoshutdown.response = response;
 
-	iov.iov_base = &req_lib_cfg_replytoshutdown;
+	iov.iov_base = (void *)&req_lib_cfg_replytoshutdown;
 	iov.iov_len = sizeof (struct req_lib_cfg_replytoshutdown);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,
@@ -722,7 +722,7 @@ cs_error_t corosync_cfg_local_get (
 	req_lib_cfg_local_get.header.size = sizeof (coroipc_request_header_t);
 	req_lib_cfg_local_get.header.id = MESSAGE_REQ_CFG_LOCAL_GET;
 
-	iov.iov_base = &req_lib_cfg_local_get;
+	iov.iov_base = (void *)&req_lib_cfg_local_get;
 	iov.iov_len = sizeof (struct req_lib_cfg_local_get);
 
 	error = coroipcc_msg_send_reply_receive (
@@ -767,7 +767,7 @@ corosync_cfg_crypto_set (
 	req_lib_cfg_crypto_set.header.size = sizeof (struct req_lib_cfg_crypto_set);
 	req_lib_cfg_crypto_set.type = type;
 
-	iov.iov_base = &req_lib_cfg_crypto_set;
+	iov.iov_base = (void *)&req_lib_cfg_crypto_set;
 	iov.iov_len = sizeof (struct req_lib_cfg_crypto_set);
 
 	error = coroipcc_msg_send_reply_receive (cfg_instance->handle,

+ 5 - 5
lib/cpg.c

@@ -372,7 +372,7 @@ cs_error_t cpg_join (
 	marshall_to_mar_cpg_name_t (&req_lib_cpg_join.group_name,
 		group);
 
-	iov[0].iov_base = &req_lib_cpg_join;
+	iov[0].iov_base = (void *)&req_lib_cpg_join;
 	iov[0].iov_len = sizeof (struct req_lib_cpg_join);
 
 	do {
@@ -413,7 +413,7 @@ cs_error_t cpg_leave (
 	marshall_to_mar_cpg_name_t (&req_lib_cpg_leave.group_name,
 		group);
 
-	iov[0].iov_base = &req_lib_cpg_leave;
+	iov[0].iov_base = (void *)&req_lib_cpg_leave;
 	iov[0].iov_len = sizeof (struct req_lib_cpg_leave);
 
 	do {
@@ -454,7 +454,7 @@ cs_error_t cpg_membership_get (
 	req_lib_cpg_membership_get.header.size = sizeof (coroipc_request_header_t);
 	req_lib_cpg_membership_get.header.id = MESSAGE_REQ_CPG_MEMBERSHIP;
 
-	iov.iov_base = &req_lib_cpg_membership_get;
+	iov.iov_base = (void *)&req_lib_cpg_membership_get;
 	iov.iov_len = sizeof (coroipc_request_header_t);
 
 	do {
@@ -503,7 +503,7 @@ cs_error_t cpg_local_get (
 	req_lib_cpg_local_get.header.size = sizeof (coroipc_request_header_t);
 	req_lib_cpg_local_get.header.id = MESSAGE_REQ_CPG_LOCAL_GET;
 
-	iov.iov_base = &req_lib_cpg_local_get;
+	iov.iov_base = (void *)&req_lib_cpg_local_get;
 	iov.iov_len = sizeof (struct req_lib_cpg_local_get);
 
 	error = coroipcc_msg_send_reply_receive (cpg_inst->handle, &iov, 1,
@@ -657,7 +657,7 @@ cs_error_t cpg_mcast_joined (
 	req_lib_cpg_mcast.guarantee = guarantee;
 	req_lib_cpg_mcast.msglen = msg_len;
 
-	iov[0].iov_base = &req_lib_cpg_mcast;
+	iov[0].iov_base = (void *)&req_lib_cpg_mcast;
 	iov[0].iov_len = sizeof (struct req_lib_cpg_mcast);
 	memcpy (&iov[1], iovec, iov_len * sizeof (struct iovec));
 

+ 5 - 5
lib/evs.c

@@ -311,7 +311,7 @@ evs_error_t evs_join (
 	req_lib_evs_join.header.id = MESSAGE_REQ_EVS_JOIN;
 	req_lib_evs_join.group_entries = group_entries;
 
-	iov[0].iov_base = &req_lib_evs_join;
+	iov[0].iov_base = (void *)&req_lib_evs_join;
 	iov[0].iov_len = sizeof (struct req_lib_evs_join);
 	iov[1].iov_base = (void*) groups; /* cast away const */
 	iov[1].iov_len = (group_entries * sizeof (struct evs_group));
@@ -352,7 +352,7 @@ evs_error_t evs_leave (
 	req_lib_evs_leave.header.id = MESSAGE_REQ_EVS_LEAVE;
 	req_lib_evs_leave.group_entries = group_entries;
 
-	iov[0].iov_base = &req_lib_evs_leave;
+	iov[0].iov_base = (void *)&req_lib_evs_leave;
 	iov[0].iov_len = sizeof (struct req_lib_evs_leave);
 	iov[1].iov_base = (void *) groups; /* cast away const */
 	iov[1].iov_len = (group_entries * sizeof (struct evs_group));
@@ -402,7 +402,7 @@ evs_error_t evs_mcast_joined (
 	req_lib_evs_mcast_joined.guarantee = guarantee;
 	req_lib_evs_mcast_joined.msg_len = msg_len;
 
-	iov[0].iov_base = &req_lib_evs_mcast_joined;
+	iov[0].iov_base = (void *)&req_lib_evs_mcast_joined;
 	iov[0].iov_len = sizeof (struct req_lib_evs_mcast_joined);
 	memcpy (&iov[1], iovec, iov_len * sizeof (struct iovec));
 
@@ -453,7 +453,7 @@ evs_error_t evs_mcast_groups (
 	req_lib_evs_mcast_groups.msg_len = msg_len;
 	req_lib_evs_mcast_groups.group_entries = group_entries;
 
-	iov[0].iov_base = &req_lib_evs_mcast_groups;
+	iov[0].iov_base = (void *)&req_lib_evs_mcast_groups;
 	iov[0].iov_len = sizeof (struct req_lib_evs_mcast_groups);
 	iov[1].iov_base = (void *) groups; /* cast away const */
 	iov[1].iov_len = (group_entries * sizeof (struct evs_group));
@@ -496,7 +496,7 @@ evs_error_t evs_membership_get (
 	req_lib_evs_membership_get.header.size = sizeof (struct req_lib_evs_membership_get);
 	req_lib_evs_membership_get.header.id = MESSAGE_REQ_EVS_MEMBERSHIP_GET;
 
-	iov.iov_base = &req_lib_evs_membership_get;
+	iov.iov_base = (void *)&req_lib_evs_membership_get;
 	iov.iov_len = sizeof (struct req_lib_evs_membership_get);
 
 	error = coroipcc_msg_send_reply_receive (evs_inst->handle,

+ 1 - 1
services/cpg.c

@@ -823,7 +823,7 @@ static void message_handler_req_exec_cpg_mcast (
 
 	memcpy(&res_lib_cpg_mcast.group_name, &req_exec_cpg_mcast->group_name,
 		sizeof(mar_cpg_name_t));
-	iovec[0].iov_base = &res_lib_cpg_mcast;
+	iovec[0].iov_base = (void *)&res_lib_cpg_mcast;
 	iovec[0].iov_len = sizeof (res_lib_cpg_mcast);
 
 	iovec[1].iov_base = (char*)message+sizeof(*req_exec_cpg_mcast);

+ 1 - 1
services/evs.c

@@ -513,7 +513,7 @@ static void message_handler_req_exec_mcast (
 
 		if (found) {
 			res_evs_deliver_callback.local_nodeid = nodeid;
-			iov[0].iov_base = &res_evs_deliver_callback;
+			iov[0].iov_base = (void *)&res_evs_deliver_callback;
 			iov[0].iov_len = sizeof (struct res_evs_deliver_callback);
 			iov[1].iov_base = (void *) msg_addr; /* discard const */
 			iov[1].iov_len = req_exec_evs_mcast->msg_len;

+ 2 - 2
services/pload.c

@@ -250,7 +250,7 @@ static void message_handler_req_pload_start (void *conn, const void *msg)
 	req_exec_pload_start.msg_size = req_lib_pload_start->msg_size;
 	req_exec_pload_start.msg_count = req_lib_pload_start->msg_count;
 	req_exec_pload_start.time_interval = req_lib_pload_start->time_interval;
-	iov.iov_base = &req_exec_pload_start;
+	iov.iov_base = (void *)&req_exec_pload_start;
 	iov.iov_len = sizeof (struct req_exec_pload_start);
 
 	msgs_delivered = 0;
@@ -281,7 +281,7 @@ static int send_message (const void *arg)
 		SERVICE_ID_MAKE (PLOAD_SERVICE, MESSAGE_REQ_EXEC_PLOAD_MCAST);
 	req_exec_pload_mcast.header.size = sizeof (struct req_exec_pload_mcast) + msg_size;
 
-	iov[0].iov_base = &req_exec_pload_mcast;
+	iov[0].iov_base = (void *)&req_exec_pload_mcast;
 	iov[0].iov_len = sizeof (struct req_exec_pload_mcast);
 	if (msg_size > sizeof (req_exec_pload_mcast)) {
 		iov[1].iov_base = buffer;

+ 3 - 3
services/votequorum.c

@@ -849,7 +849,7 @@ static int quorum_exec_send_nodeinfo()
 	req_exec_quorum_nodeinfo.header.id = SERVICE_ID_MAKE(VOTEQUORUM_SERVICE, MESSAGE_REQ_EXEC_VOTEQUORUM_NODEINFO);
 	req_exec_quorum_nodeinfo.header.size = sizeof(req_exec_quorum_nodeinfo);
 
-	iov[0].iov_base = &req_exec_quorum_nodeinfo;
+	iov[0].iov_base = (void *)&req_exec_quorum_nodeinfo;
 	iov[0].iov_len = sizeof(req_exec_quorum_nodeinfo);
 
 	ret = corosync_api->totem_mcast (iov, 1, TOTEM_AGREED);
@@ -874,7 +874,7 @@ static int quorum_exec_send_reconfigure(int param, int nodeid, int value)
 	req_exec_quorum_reconfigure.header.id = SERVICE_ID_MAKE(VOTEQUORUM_SERVICE, MESSAGE_REQ_EXEC_VOTEQUORUM_RECONFIGURE);
 	req_exec_quorum_reconfigure.header.size = sizeof(req_exec_quorum_reconfigure);
 
-	iov[0].iov_base = &req_exec_quorum_reconfigure;
+	iov[0].iov_base = (void *)&req_exec_quorum_reconfigure;
 	iov[0].iov_len = sizeof(req_exec_quorum_reconfigure);
 
 	ret = corosync_api->totem_mcast (iov, 1, TOTEM_AGREED);
@@ -897,7 +897,7 @@ static int quorum_exec_send_killnode(int nodeid, unsigned int reason)
 	req_exec_quorum_killnode.header.id = SERVICE_ID_MAKE(VOTEQUORUM_SERVICE, MESSAGE_REQ_EXEC_VOTEQUORUM_KILLNODE);
 	req_exec_quorum_killnode.header.size = sizeof(req_exec_quorum_killnode);
 
-	iov[0].iov_base = &req_exec_quorum_killnode;
+	iov[0].iov_base = (void *)&req_exec_quorum_killnode;
 	iov[0].iov_len = sizeof(req_exec_quorum_killnode);
 
 	ret = corosync_api->totem_mcast (iov, 1, TOTEM_AGREED);

+ 2 - 2
test/cpgverify.c

@@ -124,9 +124,9 @@ int main (void)
                 exit (1);
         }
 
-	iov[0].iov_base = &msg;
+	iov[0].iov_base = (void *)&msg;
 	iov[0].iov_len = sizeof (struct my_msg);
-	iov[1].iov_base = buffer;
+	iov[1].iov_base = (void *)buffer;
 
 	/*
 	 * Demonstrate cpg_mcast_joined

+ 2 - 2
test/evsverify.c

@@ -150,9 +150,9 @@ int main (void)
 	printf ("Leave result %d\n", result);
 	delivery_string = "evs_mcast_joined";
 
-	iov[0].iov_base = &msg;
+	iov[0].iov_base = (void *)&msg;
 	iov[0].iov_len = sizeof (struct my_msg);
-	iov[1].iov_base = buffer;
+	iov[1].iov_base = (void *)buffer;
 
 	/*
 	 * Demonstrate evs_mcast_joined