Pārlūkot izejas kodu

defect 914
fix gcc 4 specific compile warnings and compile errors


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@834 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 20 gadi atpakaļ
vecāks
revīzija
dfa61b911d
20 mainītis faili ar 97 papildinājumiem un 116 dzēšanām
  1. 1 1
      exec/ckpt.c
  2. 6 6
      exec/clm.c
  3. 1 1
      exec/keygen.c
  4. 2 21
      exec/lck.c
  5. 1 1
      exec/totemconfig.c
  6. 1 1
      exec/totemconfig.h
  7. 13 13
      exec/totemnet.c
  8. 3 3
      exec/totemrrp.c
  9. 5 11
      exec/totemsrp.c
  10. 2 1
      lib/evt.c
  11. 0 1
      test/evsbench.c
  12. 3 2
      test/evtbench.c
  13. 3 2
      test/publish.c
  14. 9 9
      test/subscription.c
  15. 2 1
      test/testamf.c
  16. 6 6
      test/testckpt.c
  17. 4 3
      test/testclm.c
  18. 2 2
      test/testclm2.c
  19. 24 22
      test/testevt.c
  20. 9 9
      test/testlck.c

+ 1 - 1
exec/ckpt.c

@@ -701,7 +701,7 @@ static int ckpt_recovery_process (void)
 		 		* so lets start with sending the sync_msg
 		 		* so lets start with sending the sync_msg
 		 		*/	
 		 		*/	
 				if (recovery_section_send_flag == 0) {
 				if (recovery_section_send_flag == 0) {
-					if ((int)ckptCheckpointSection->sectionDescriptor.sectionId.id) {
+					if (ckptCheckpointSection->sectionDescriptor.sectionId.id) {
 						log_printf (LOG_LEVEL_DEBUG, "CKPT: New Sync State Message for ckpt = %s, section = %s.\n", 
 						log_printf (LOG_LEVEL_DEBUG, "CKPT: New Sync State Message for ckpt = %s, section = %s.\n", 
 							(char*)&checkpoint->name.value,
 							(char*)&checkpoint->name.value,
 							((char*)ckptCheckpointSection->sectionDescriptor.sectionId.id));							
 							((char*)ckptCheckpointSection->sectionDescriptor.sectionId.id));							

+ 6 - 6
exec/clm.c

@@ -203,10 +203,10 @@ static int clm_exec_init_fn (struct openais_config *openais_config)
 	 * Build local cluster node data structure
 	 * Build local cluster node data structure
 	 */
 	 */
 	thisClusterNode.nodeId = this_ip->sin_addr.s_addr;
 	thisClusterNode.nodeId = this_ip->sin_addr.s_addr;
-	sprintf (thisClusterNode.nodeAddress.value, "%s", inet_ntoa (this_ip->sin_addr));
-	thisClusterNode.nodeAddress.length = strlen (thisClusterNode.nodeAddress.value);
+	sprintf ((char *)thisClusterNode.nodeAddress.value, "%s", inet_ntoa (this_ip->sin_addr));
+	thisClusterNode.nodeAddress.length = strlen ((char *)thisClusterNode.nodeAddress.value);
 	thisClusterNode.nodeAddress.family = SA_CLM_AF_INET;
 	thisClusterNode.nodeAddress.family = SA_CLM_AF_INET;
-	sprintf (thisClusterNode.nodeName.value, "%s", inet_ntoa (this_ip->sin_addr));
+	sprintf ((char *)thisClusterNode.nodeName.value, "%s", inet_ntoa (this_ip->sin_addr));
 	thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
 	thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
 	thisClusterNode.member = 1;
 	thisClusterNode.member = 1;
 	{
 	{
@@ -425,10 +425,10 @@ static int clm_confchg_fn (
 	thisClusterNode.nodeId = this_ip->sin_addr.s_addr;
 	thisClusterNode.nodeId = this_ip->sin_addr.s_addr;
 	strcpy ((char *)thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
 	strcpy ((char *)thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
 
 
-	sprintf (thisClusterNode.nodeAddress.value, "%s", inet_ntoa (this_ip->sin_addr));
-	thisClusterNode.nodeAddress.length = strlen (thisClusterNode.nodeAddress.value);
+	sprintf ((char *)thisClusterNode.nodeAddress.value, "%s", inet_ntoa (this_ip->sin_addr));
+	thisClusterNode.nodeAddress.length = strlen ((char *)thisClusterNode.nodeAddress.value);
 	thisClusterNode.nodeAddress.family = SA_CLM_AF_INET;
 	thisClusterNode.nodeAddress.family = SA_CLM_AF_INET;
-	sprintf (thisClusterNode.nodeName.value, "%s", inet_ntoa (this_ip->sin_addr));
+	sprintf ((char *)thisClusterNode.nodeName.value, "%s", inet_ntoa (this_ip->sin_addr));
 	thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
 	thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
 
 
 	return (0);
 	return (0);

+ 1 - 1
exec/keygen.c

@@ -53,7 +53,7 @@ int main (void) {
 	}
 	}
 	mkdir ("/etc/ais", 0700);
 	mkdir ("/etc/ais", 0700);
 
 
-	printf ("Gathering %d bits for key from /dev/random.\n", sizeof (key) * 8);
+	printf ("Gathering %ld bits for key from /dev/random.\n", sizeof (key) * 8);
 	random_fd = open ("/dev/random", O_RDONLY);
 	random_fd = open ("/dev/random", O_RDONLY);
 	if (random_fd == -1) {
 	if (random_fd == -1) {
 		perror ("Is /dev/random present? Opening /dev/random");
 		perror ("Is /dev/random present? Opening /dev/random");

+ 2 - 21
exec/lck.c

@@ -393,11 +393,8 @@ static struct resource_lock *resource_lock_find (
 		list != &resource->resource_lock_list_head;
 		list != &resource->resource_lock_list_head;
 		list = list->next) {
 		list = list->next) {
 
 
-printf ("%x next %x prev %x\n", list, list->next, list->prev);
-printf ("next resource\n");
 		resource_lock = list_entry (list, struct resource_lock, resource_list);
 		resource_lock = list_entry (list, struct resource_lock, resource_list);
 
 
-printf ("lock id %llx\n", resource_lock->lock_id);
 		if ((memcmp (&resource_lock->callback_source,
 		if ((memcmp (&resource_lock->callback_source,
 			source, sizeof (struct message_source)) == 0) &&
 			source, sizeof (struct message_source)) == 0) &&
 			(lock_id == resource_lock->lock_id)) {
 			(lock_id == resource_lock->lock_id)) {
@@ -490,7 +487,6 @@ void lck_resource_cleanup_lock_remove (
 		list = list->next) {
 		list = list->next) {
 
 
 		resource_lock = list_entry (list, struct resource_lock, resource_cleanup_list);
 		resource_lock = list_entry (list, struct resource_lock, resource_cleanup_list);
-		printf ("Found another lock resource to unlock\n");
 		resource_lock_orphan (resource_lock);
 		resource_lock_orphan (resource_lock);
 	}
 	}
 }
 }
@@ -533,12 +529,11 @@ static int lck_exit_fn (struct conn_info *conn_info)
 	struct resource_cleanup *resource_cleanup;
 	struct resource_cleanup *resource_cleanup;
 	struct list_head *list;
 	struct list_head *list;
 	
 	
-printf ("exit_fn\n");
 	if (conn_info->conn_info_partner->service != LCK_SERVICE) {
 	if (conn_info->conn_info_partner->service != LCK_SERVICE) {
 		return 0;
 		return 0;
 	}
 	}
 
 
-	log_printf(LOG_LEVEL_NOTICE, "lck_exit_fn conn_info = %#x, with fd = %d\n", conn_info, conn_info->fd);
+	log_printf(LOG_LEVEL_NOTICE, "lck_exit_fn conn_info = %p, with fd = %d\n", conn_info, conn_info->fd);
 	
 	
 	/*
 	/*
 	 * close all resources opened on this fd
 	 * close all resources opened on this fd
@@ -548,13 +543,11 @@ printf ("exit_fn\n");
 		
 		
 		resource_cleanup = list_entry (list, struct resource_cleanup, list);
 		resource_cleanup = list_entry (list, struct resource_cleanup, list);
 		
 		
-printf ("resource to cleanup\n");
 		if (resource_cleanup->resource->name.length > 0)	{
 		if (resource_cleanup->resource->name.length > 0)	{
 			lck_resource_cleanup_lock_remove (resource_cleanup);
 			lck_resource_cleanup_lock_remove (resource_cleanup);
 			lck_resource_close (resource_cleanup->resource);
 			lck_resource_close (resource_cleanup->resource);
 		}
 		}
 		
 		
-printf ("resource cleanup %x\n", resource_cleanup);
 		list_del (&resource_cleanup->list);	
 		list_del (&resource_cleanup->list);	
 		free (resource_cleanup);
 		free (resource_cleanup);
                 
                 
@@ -641,7 +634,6 @@ static int message_handler_req_exec_lck_resourceopen (
 			&req_exec_lck_resourceopen->source.conn_info->ais_ci.u.liblck_ci.resource_cleanup_list);
 			&req_exec_lck_resourceopen->source.conn_info->ais_ci.u.liblck_ci.resource_cleanup_list);
 	}
 	}
 	resource->refcount += 1;
 	resource->refcount += 1;
-printf ("refcount == %d\n", resource->refcount);
 	
 	
 	
 	
 	/*
 	/*
@@ -711,9 +703,7 @@ static int message_handler_req_exec_lck_resourceclose (
 	}
 	}
 		
 		
 	resource->refcount -= 1;
 	resource->refcount -= 1;
-printf ("refcount %d\n", resource->refcount);
 	if (resource->refcount == 0) {
 	if (resource->refcount == 0) {
-		printf ("should free resource\n");
 	}
 	}
 error_exit:
 error_exit:
 	if (message_source_is_local(&req_exec_lck_resourceclose->source)) {
 	if (message_source_is_local(&req_exec_lck_resourceclose->source)) {
@@ -762,7 +752,6 @@ void waiter_notification_list_send (struct list_head *list_notify_head)
 	struct list_head *list;
 	struct list_head *list;
 	struct resource_lock *resource_lock;
 	struct resource_lock *resource_lock;
 
 
-	printf ("sending waiter notification to resource_lock list\n");
 	for (list = list_notify_head->next;
 	for (list = list_notify_head->next;
 		list != list_notify_head;
 		list != list_notify_head;
 		list = list->next) {
 		list = list->next) {
@@ -781,7 +770,6 @@ void resource_lock_async_deliver (
 
 
 	if (source && message_source_is_local(source)) {
 	if (source && message_source_is_local(source)) {
 		if (resource_lock->async_call) {
 		if (resource_lock->async_call) {
-printf ("resource lock async deliver\n");
 			res_lib_lck_resourcelockasync.header.size = sizeof (struct res_lib_lck_resourcelockasync);
 			res_lib_lck_resourcelockasync.header.size = sizeof (struct res_lib_lck_resourcelockasync);
 			res_lib_lck_resourcelockasync.header.id = MESSAGE_RES_LCK_RESOURCELOCKASYNC;
 			res_lib_lck_resourcelockasync.header.id = MESSAGE_RES_LCK_RESOURCELOCKASYNC;
 			res_lib_lck_resourcelockasync.header.error = error;
 			res_lib_lck_resourcelockasync.header.error = error;
@@ -803,7 +791,6 @@ void lock_response_deliver (
 {
 {
 	struct res_lib_lck_resourcelock res_lib_lck_resourcelock;
 	struct res_lib_lck_resourcelock res_lib_lck_resourcelock;
 
 
-	printf ("deliver\n");
 	if (source && message_source_is_local(source)) {
 	if (source && message_source_is_local(source)) {
 		if (resource_lock->async_call) {
 		if (resource_lock->async_call) {
 			resource_lock_async_deliver (&resource_lock->callback_source, resource_lock, error);
 			resource_lock_async_deliver (&resource_lock->callback_source, resource_lock, error);
@@ -919,7 +906,6 @@ void unlock_algorithm (
 	struct list_head *list;
 	struct list_head *list;
 	struct list_head *list_p;
 	struct list_head *list_p;
 
 
-	printf ("unlock\n");
 	/*
 	/*
 	 * If unlocking the ex lock, reset ex granted
 	 * If unlocking the ex lock, reset ex granted
 	 */
 	 */
@@ -1117,7 +1103,6 @@ static int message_handler_req_exec_lck_resourceunlock (
 	if (resource == 0) {
 	if (resource == 0) {
 		goto error_exit;
 		goto error_exit;
 	}
 	}
-printf ("resource %x\n", resource);
 	resource->refcount -= 1;
 	resource->refcount -= 1;
 
 
 	resource_lock = resource_lock_find (resource,
 	resource_lock = resource_lock_find (resource,
@@ -1171,7 +1156,6 @@ static int message_handler_req_exec_lck_resourcelockorphan (
 	resource = resource_find (&req_exec_lck_resourcelockorphan->resource_name);
 	resource = resource_find (&req_exec_lck_resourcelockorphan->resource_name);
 	if (resource == 0) {
 	if (resource == 0) {
 		assert (0);
 		assert (0);
-		goto error_exit;
 	}
 	}
 	resource->refcount -= 1;
 	resource->refcount -= 1;
 
 
@@ -1182,7 +1166,7 @@ static int message_handler_req_exec_lck_resourcelockorphan (
 
 
 	list_del (&resource_lock->resource_cleanup_list);
 	list_del (&resource_lock->resource_cleanup_list);
 	unlock_algorithm (resource, resource_lock);
 	unlock_algorithm (resource, resource_lock);
-error_exit:
+	return (0);
 }
 }
 
 
 static int message_handler_req_exec_lck_lockpurge (
 static int message_handler_req_exec_lck_lockpurge (
@@ -1240,7 +1224,6 @@ static int message_handler_req_lib_lck_resourceopen (struct conn_info *conn_info
 	req_exec_lck_resourceopen.async_call = 0;
 	req_exec_lck_resourceopen.async_call = 0;
 	req_exec_lck_resourceopen.invocation = 0;
 	req_exec_lck_resourceopen.invocation = 0;
 	req_exec_lck_resourceopen.resource_handle = req_lib_lck_resourceopen->resourceHandle;
 	req_exec_lck_resourceopen.resource_handle = req_lib_lck_resourceopen->resourceHandle;
-printf ("lib open handle %llx\n", req_exec_lck_resourceopen.resource_handle);
 	req_exec_lck_resourceopen.fail_with_error = SA_AIS_OK;
 	req_exec_lck_resourceopen.fail_with_error = SA_AIS_OK;
 
 
 	iovec.iov_base = (char *)&req_exec_lck_resourceopen;
 	iovec.iov_base = (char *)&req_exec_lck_resourceopen;
@@ -1271,7 +1254,6 @@ static int message_handler_req_lib_lck_resourceopenasync (struct conn_info *conn
 		sizeof (SaNameT));
 		sizeof (SaNameT));
 	
 	
 	req_exec_lck_resourceopen.resource_handle = req_lib_lck_resourceopen->resourceHandle;
 	req_exec_lck_resourceopen.resource_handle = req_lib_lck_resourceopen->resourceHandle;
-printf ("lib open handle %llx\n", req_exec_lck_resourceopen.resource_handle);
 	req_exec_lck_resourceopen.invocation = req_lib_lck_resourceopen->invocation;
 	req_exec_lck_resourceopen.invocation = req_lib_lck_resourceopen->invocation;
 	req_exec_lck_resourceopen.open_flags = req_lib_lck_resourceopen->resourceOpenFlags;
 	req_exec_lck_resourceopen.open_flags = req_lib_lck_resourceopen->resourceOpenFlags;
 	req_exec_lck_resourceopen.timeout = 0;
 	req_exec_lck_resourceopen.timeout = 0;
@@ -1352,7 +1334,6 @@ static int message_handler_req_lib_lck_resourcelock (struct conn_info *conn_info
 	req_exec_lck_resourcelock.invocation = 0;
 	req_exec_lck_resourcelock.invocation = 0;
 	req_exec_lck_resourcelock.fail_with_error = SA_AIS_OK;
 	req_exec_lck_resourcelock.fail_with_error = SA_AIS_OK;
 
 
-printf ("handle %d\n", req_exec_lck_resourcelock.resource_handle);
 	iovecs[0].iov_base = (char *)&req_exec_lck_resourcelock;
 	iovecs[0].iov_base = (char *)&req_exec_lck_resourcelock;
 	iovecs[0].iov_len = sizeof (req_exec_lck_resourcelock);
 	iovecs[0].iov_len = sizeof (req_exec_lck_resourcelock);
 
 

+ 1 - 1
exec/totemconfig.c

@@ -449,7 +449,7 @@ parse_error:
 }
 }
 
 
 int totem_config_keyread (
 int totem_config_keyread (
-	unsigned char *key_location,
+	char *key_location,
 	struct totem_config *totem_config,
 	struct totem_config *totem_config,
 	char **error_string)
 	char **error_string)
 {
 {

+ 1 - 1
exec/totemconfig.h

@@ -51,7 +51,7 @@ extern int totem_config_validate (
 	char **error_string);
 	char **error_string);
 
 
 int totem_config_keyread (
 int totem_config_keyread (
-	unsigned char *key_location,
+	char *key_location,
 	struct totem_config *totem_config,
 	struct totem_config *totem_config,
 	char **error_string);
 	char **error_string);
 
 

+ 13 - 13
exec/totemnet.c

@@ -89,7 +89,7 @@ struct security_header {
 } __attribute__((packed));
 } __attribute__((packed));
 
 
 struct totemnet_mcast_thread_state {
 struct totemnet_mcast_thread_state {
-	char iobuf[9000];
+	unsigned char iobuf[9000];
 	prng_state prng_state;
 	prng_state prng_state;
 };
 };
 
 
@@ -237,14 +237,14 @@ static int authenticate_and_decrypt (
 	struct totemnet_instance *instance,
 	struct totemnet_instance *instance,
 	struct iovec *iov)
 	struct iovec *iov)
 {
 {
-	char keys[48];
+	unsigned char keys[48];
 	struct security_header *header = iov[0].iov_base;
 	struct security_header *header = iov[0].iov_base;
 	prng_state keygen_prng_state;
 	prng_state keygen_prng_state;
 	prng_state stream_prng_state;
 	prng_state stream_prng_state;
-	char *hmac_key = &keys[32];
-	char *cipher_key = &keys[16];
-	char *initial_vector = &keys[0];
-	char digest_comparison[HMAC_HASH_SIZE];
+	unsigned char *hmac_key = &keys[32];
+	unsigned char *cipher_key = &keys[16];
+	unsigned char *initial_vector = &keys[0];
+	unsigned char digest_comparison[HMAC_HASH_SIZE];
 	unsigned long len;
 	unsigned long len;
 	int res = 0;
 	int res = 0;
 
 
@@ -297,19 +297,19 @@ static int authenticate_and_decrypt (
 }
 }
 static void encrypt_and_sign_worker (
 static void encrypt_and_sign_worker (
 	struct totemnet_instance *instance,
 	struct totemnet_instance *instance,
-	char *buf,
+	unsigned char *buf,
 	int *buf_len,
 	int *buf_len,
 	struct iovec *iovec,
 	struct iovec *iovec,
 	int iov_len,
 	int iov_len,
 	prng_state *prng_state_in)
 	prng_state *prng_state_in)
 {
 {
 	int i;
 	int i;
-	char *addr;
-	char keys[48];
+	unsigned char *addr;
+	unsigned char keys[48];
 	struct security_header *header;
 	struct security_header *header;
-	char *hmac_key = &keys[32];
-	char *cipher_key = &keys[16];
-	char *initial_vector = &keys[0];
+	unsigned char *hmac_key = &keys[32];
+	unsigned char *cipher_key = &keys[16];
+	unsigned char *initial_vector = &keys[0];
 	unsigned long len;
 	unsigned long len;
 	int outlen = 0;
 	int outlen = 0;
 	hmac_state hmac_state;
 	hmac_state hmac_state;
@@ -1238,7 +1238,7 @@ int totemnet_recv_flush (totemnet_handle handle)
 	struct pollfd ufd;
 	struct pollfd ufd;
 	int nfds;
 	int nfds;
 	int res = 0;
 	int res = 0;
-	int prio;
+	unsigned int prio;
 
 
 	error = saHandleInstanceGet (&totemnet_instance_database, handle,
 	error = saHandleInstanceGet (&totemnet_instance_database, handle,
 		(void *)&instance);
 		(void *)&instance);

+ 3 - 3
exec/totemrrp.c

@@ -442,7 +442,7 @@ void active_token_recv (
 {
 {
 	unsigned int cur_token_seq;
 	unsigned int cur_token_seq;
 	unsigned int last_token_seq;
 	unsigned int last_token_seq;
-	int token_is;
+	unsigned int token_is;
 	int i;
 	int i;
 	struct active_instance *active_instance = (struct active_instance *)instance->rrp_algo_instance;
 	struct active_instance *active_instance = (struct active_instance *)instance->rrp_algo_instance;
 
 
@@ -525,8 +525,8 @@ void rrp_deliver_fn (
 	void *msg,
 	void *msg,
 	int msg_len)
 	int msg_len)
 {
 {
-	int token_seqid;
-	int token_is;
+	unsigned int token_seqid;
+	unsigned int token_is;
 
 
 	struct deliver_fn_context *deliver_fn_context = (struct deliver_fn_context *)context;
 	struct deliver_fn_context *deliver_fn_context = (struct deliver_fn_context *)context;
 
 

+ 5 - 11
exec/totemsrp.c

@@ -1090,9 +1090,9 @@ static void memb_state_consensus_timeout_expired (
 	}
 	}
 }
 }
 
 
-static int memb_join_message_send (struct totemsrp_instance *instance);
+static void memb_join_message_send (struct totemsrp_instance *instance);
 
 
-static int memb_merge_detect_transmit (struct totemsrp_instance *instance);
+static void memb_merge_detect_transmit (struct totemsrp_instance *instance);
 
 
 /*
 /*
  * Timers used for various states of the membership algorithm
  * Timers used for various states of the membership algorithm
@@ -2309,10 +2309,9 @@ static void memb_state_commit_token_create (
 	commit_token->addr_entries = token_memb_entries;
 	commit_token->addr_entries = token_memb_entries;
 }
 }
 
 
-static int memb_join_message_send (struct totemsrp_instance *instance)
+static void memb_join_message_send (struct totemsrp_instance *instance)
 {
 {
 	struct memb_join memb_join;
 	struct memb_join memb_join;
-	int res;
 
 
 	memb_join.header.type = MESSAGE_TYPE_MEMB_JOIN;
 	memb_join.header.type = MESSAGE_TYPE_MEMB_JOIN;
 	memb_join.header.endian_detector = ENDIAN_LOCAL;
 	memb_join.header.endian_detector = ENDIAN_LOCAL;
@@ -2332,14 +2331,11 @@ static int memb_join_message_send (struct totemsrp_instance *instance)
 		instance->totemrrp_handle,
 		instance->totemrrp_handle,
 		&memb_join,
 		&memb_join,
 		sizeof (struct memb_join));
 		sizeof (struct memb_join));
-
-	return (res);
 }
 }
 
 
-static int memb_merge_detect_transmit (struct totemsrp_instance *instance) 
+static void memb_merge_detect_transmit (struct totemsrp_instance *instance) 
 {
 {
 	struct memb_merge_detect memb_merge_detect;
 	struct memb_merge_detect memb_merge_detect;
-	int res;
 
 
 	memb_merge_detect.header.type = MESSAGE_TYPE_MEMB_MERGE_DETECT;
 	memb_merge_detect.header.type = MESSAGE_TYPE_MEMB_MERGE_DETECT;
 	memb_merge_detect.header.endian_detector = ENDIAN_LOCAL;
 	memb_merge_detect.header.endian_detector = ENDIAN_LOCAL;
@@ -2351,8 +2347,6 @@ static int memb_merge_detect_transmit (struct totemsrp_instance *instance)
 		instance->totemrrp_handle,
 		instance->totemrrp_handle,
 		&memb_merge_detect,
 		&memb_merge_detect,
 		sizeof (struct memb_merge_detect));
 		sizeof (struct memb_merge_detect));
-
-	return (res);
 }
 }
 
 
 static void memb_ring_id_create_or_load (
 static void memb_ring_id_create_or_load (
@@ -2829,7 +2823,7 @@ static void messages_deliver_to_app (
 	 * Deliver messages in order from rtr queue to pending delivery queue
 	 * Deliver messages in order from rtr queue to pending delivery queue
 	 */
 	 */
 	for (i = instance->my_high_delivered + 1; i <= end_point; i++) {
 	for (i = instance->my_high_delivered + 1; i <= end_point; i++) {
-		void *ptr;
+		void *ptr = 0;
 
 
 		res = sq_item_get (&instance->regular_sort_queue, i, &ptr);
 		res = sq_item_get (&instance->regular_sort_queue, i, &ptr);
 		if (res != 0 && skip) {
 		if (res != 0 && skip) {

+ 2 - 1
lib/evt.c

@@ -516,7 +516,8 @@ static SaAisErrorT make_event(SaEvtEventHandleT *event_handle,
 		edi->edi_patterns.patterns[i].allocatedSize = pat->patternSize;
 		edi->edi_patterns.patterns[i].allocatedSize = pat->patternSize;
 		edi->edi_patterns.patterns[i].pattern = malloc(pat->patternSize);
 		edi->edi_patterns.patterns[i].pattern = malloc(pat->patternSize);
 		if (!edi->edi_patterns.patterns[i].pattern) {
 		if (!edi->edi_patterns.patterns[i].pattern) {
-			printf("make_event: couldn't alloc %lld bytes\n", pat->patternSize);
+			printf("make_event: couldn't alloc %llu bytes\n",
+				(unsigned long long)pat->patternSize);
 			error =  SA_AIS_ERR_LIBRARY;
 			error =  SA_AIS_ERR_LIBRARY;
 			break;
 			break;
 		}
 		}

+ 0 - 1
test/evsbench.c

@@ -121,7 +121,6 @@ void evs_benchmark (evs_handle_t handle,
 	iov.iov_len = write_size;
 	iov.iov_len = write_size;
 	do {
 	do {
 		sprintf (buffer, "This is message %d\n", write_count);
 		sprintf (buffer, "This is message %d\n", write_count);
-retry_mcast:
 		if (outstanding < 10) {
 		if (outstanding < 10) {
 			result = evs_mcast_joined (handle, EVS_TYPE_AGREED, &iov, 1);
 			result = evs_mcast_joined (handle, EVS_TYPE_AGREED, &iov, 1);
 
 

+ 3 - 2
test/evtbench.c

@@ -294,7 +294,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	printf("event_callback called\n");
 	printf("event_callback called\n");
 	printf("sub ID: %x\n", subscription_id);
 	printf("sub ID: %x\n", subscription_id);
 	printf("event_handle %llx\n", (unsigned long long)event_handle);
 	printf("event_handle %llx\n", (unsigned long long)event_handle);
-	printf("event data size %lld\n", event_data_size);
+	printf("event data size %llu\n", (unsigned long long)event_data_size);
 
 
 	evt_pat_get_array.patternsNumber = 4;
 	evt_pat_get_array.patternsNumber = 4;
 	result = saEvtEventAttributesGet(event_handle,
 	result = saEvtEventAttributesGet(event_handle,
@@ -309,7 +309,8 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		printf("event get attr result(2): %d\n", result);
 		printf("event get attr result(2): %d\n", result);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
-	printf("pattern array count: %lld\n", evt_pat_get_array.patternsNumber);
+	printf("pattern array count: %llu\n",
+		(unsigned long long)evt_pat_get_array.patternsNumber);
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 		printf( "pattern %d =\"%s\"\n", i,
 		printf( "pattern %d =\"%s\"\n", i,
 				  evt_pat_get_array.patterns[i].pattern);
 				  evt_pat_get_array.patterns[i].pattern);

+ 3 - 2
test/publish.c

@@ -318,7 +318,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	printf("sub ID: %x\n", subscription_id);
 	printf("sub ID: %x\n", subscription_id);
 	printf("event_handle %llx\n", 
 	printf("event_handle %llx\n", 
 			(unsigned long long)event_handle);
 			(unsigned long long)event_handle);
-	printf("event data size %lld\n", event_data_size);
+	printf("event data size %llu\n", (unsigned long long)event_data_size);
 
 
 	evt_pat_get_array.patternsNumber = 4;
 	evt_pat_get_array.patternsNumber = 4;
 	do {
 	do {
@@ -336,7 +336,8 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		printf("event get attr result(2): %s\n", result_buf);
 		printf("event get attr result(2): %s\n", result_buf);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
-	printf("pattern array count: %lld\n", evt_pat_get_array.patternsNumber);
+	printf("pattern array count: %llu\n",
+		(unsigned long long)evt_pat_get_array.patternsNumber);
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 		printf( "pattern %d =\"%s\"\n", i,
 		printf( "pattern %d =\"%s\"\n", i,
 				  evt_pat_get_array.patterns[i].pattern);
 				  evt_pat_get_array.patterns[i].pattern);

+ 9 - 9
test/subscription.c

@@ -170,7 +170,7 @@ test_subscription()
 		}
 		}
 
 
 		if (pfd.revents & (POLLERR|POLLHUP)) {
 		if (pfd.revents & (POLLERR|POLLHUP)) {
-			printf("Error recieved on poll fd %lld\n", fd);
+			printf("Error recieved on poll fd %llu\n", (unsigned long long)fd);
 			result =  SA_AIS_ERR_BAD_OPERATION;
 			result =  SA_AIS_ERR_BAD_OPERATION;
 			goto sub_fin;
 			goto sub_fin;
 		}
 		}
@@ -251,7 +251,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	if (!quiet)
 	if (!quiet)
 		dprintf("event_handle %llx\n", (unsigned long long)event_handle);
 		dprintf("event_handle %llx\n", (unsigned long long)event_handle);
 	if (!quiet)
 	if (!quiet)
-		dprintf("event data size %lld\n", event_data_size);
+		dprintf("event data size %llu\n", (unsigned long long)event_data_size);
 
 
 	evt_pat_get_array.patterns[0].patternSize = PAT_SIZE;
 	evt_pat_get_array.patterns[0].patternSize = PAT_SIZE;
 	evt_pat_get_array.patterns[1].patternSize = PAT_SIZE;
 	evt_pat_get_array.patterns[1].patternSize = PAT_SIZE;
@@ -272,8 +272,8 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 	if (!quiet) {
 	if (!quiet) {
-		dprintf("pattern array count: %lld\n", 
-				evt_pat_get_array.patternsNumber);
+		dprintf("pattern array count: %llu\n", 
+				(unsigned long long)evt_pat_get_array.patternsNumber);
 		for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 		for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 			dprintf( "pattern %d =\"%s\"\n", i,
 			dprintf( "pattern %d =\"%s\"\n", i,
 				  evt_pat_get_array.patterns[i].pattern);
 				  evt_pat_get_array.patterns[i].pattern);
@@ -334,8 +334,8 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 #endif
 #endif
 
 
 	if (event_data_size != user_data_size) {
 	if (event_data_size != user_data_size) {
-		dprintf("unexpected data size: e=%d, a=%lld\n",
-				user_data_size, event_data_size);
+		dprintf("unexpected data size: e=%d, a=%llu\n",
+				user_data_size, (unsigned long long)event_data_size);
 		goto evt_free;
 		goto evt_free;
 	} 
 	} 
 
 
@@ -348,9 +348,9 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 	if (received_size != event_data_size) {
 	if (received_size != event_data_size) {
-		dprintf("event data mismatch e=%lld, a=%lld\n",
-				event_data_size, 
-				received_size);
+		dprintf("event data mismatch e=%llu, a=%llu\n",
+				(unsigned long long)event_data_size, 
+				(unsigned long long)received_size);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 	if (memcmp(user_data, event_data, user_data_size) != 0 ) {
 	if (memcmp(user_data, event_data, user_data_size) != 0 ) {

+ 2 - 1
test/testamf.c

@@ -167,7 +167,8 @@ void CSIRemoveCallback (
 	const SaNameT *csiName,
 	const SaNameT *csiName,
 	const SaAmfCSIFlagsT *csiFlags)
 	const SaAmfCSIFlagsT *csiFlags)
 {
 {
-	printf ("CSIRemoveCallback invocation id %lld compName ", invocation);
+	printf ("CSIRemoveCallback invocation id %llu compName ",
+		(unsigned long long)invocation);
 	printSaNameT ((SaNameT *)compName);
 	printSaNameT ((SaNameT *)compName);
 	printf (" csiName ");
 	printf (" csiName ");
 	printSaNameT ((SaNameT *)csiName);
 	printSaNameT ((SaNameT *)csiName);

+ 6 - 6
test/testckpt.c

@@ -216,8 +216,8 @@ int main (void) {
 
 
 	error = saCkptSelectionObjectGet (ckptHandle, &sel_fd);
 	error = saCkptSelectionObjectGet (ckptHandle, &sel_fd);
 
 
-	printf ("%s: Retrieve selection object %lld\n",
-	get_test_output (error, SA_AIS_OK), sel_fd);
+	printf ("%s: Retrieve selection object %llu\n",
+	get_test_output (error, SA_AIS_OK), (unsigned long long)sel_fd);
 
 
 	FD_SET (sel_fd, &read_set);
 	FD_SET (sel_fd, &read_set);
 	select (sel_fd + 1, &read_set, 0, 0, 0);
 	select (sel_fd + 1, &read_set, 0, 0, 0);
@@ -475,12 +475,12 @@ printf ("Please wait, testing expiry of checkpoint sections.\n");
 		printf ("%s: Get next section in iteartion\n",
 		printf ("%s: Get next section in iteartion\n",
 			get_test_output (error, SA_AIS_OK));
 			get_test_output (error, SA_AIS_OK));
 		if (error == SA_OK) {
 		if (error == SA_OK) {
-			printf ("Section '%s' expires %llx size %lld state %x update %llx\n",
+			printf ("Section '%s' expires %llx size %llu state %x update %llx\n",
 				sectionDescriptor.sectionId.id,
 				sectionDescriptor.sectionId.id,
-				sectionDescriptor.expirationTime,
-				sectionDescriptor.sectionSize,
+				(unsigned long long)sectionDescriptor.expirationTime,
+				(unsigned long long)sectionDescriptor.sectionSize,
 				sectionDescriptor.sectionState,
 				sectionDescriptor.sectionState,
-				sectionDescriptor.lastUpdate);
+				(unsigned long long)sectionDescriptor.lastUpdate);
 		}
 		}
 	} while (error == SA_OK);
 	} while (error == SA_OK);
 	printf ("The last iteration should fail\n");
 	printf ("The last iteration should fail\n");

+ 4 - 3
test/testclm.c

@@ -89,9 +89,10 @@ void NodeGetCallback (
 	char buf[128];
 	char buf[128];
 
 
 	if (error != SA_AIS_OK) {
 	if (error != SA_AIS_OK) {
-		printf ("Node for invocation %lld not found (%d)\n", invocation, error);
+		printf ("Node for invocation %llu not found (%d)\n",
+			(unsigned long long)invocation, error);
 	} else {
 	} else {
-		sprintf (buf, "NODEGETCALLBACK %lld\n", invocation);
+		sprintf (buf, "NODEGETCALLBACK %llu\n", (unsigned long long)invocation);
 		printSaClmClusterNodeT (buf, (SaClmClusterNodeT *)clusterNode);
 		printSaClmClusterNodeT (buf, (SaClmClusterNodeT *)clusterNode);
 	}
 	}
 }
 }
@@ -189,7 +190,7 @@ int main (void) {
 
 
 	saClmSelectionObjectGet (handle, &select_fd);
 	saClmSelectionObjectGet (handle, &select_fd);
 
 
-printf ("select fd is %lld\n", select_fd);
+printf ("select fd is %llu\n", (unsigned long long)select_fd);
 	FD_ZERO (&read_fds);
 	FD_ZERO (&read_fds);
 printf ("press the enter key to exit with track stop and finalize.\n");
 printf ("press the enter key to exit with track stop and finalize.\n");
 	do {
 	do {

+ 2 - 2
test/testclm2.c

@@ -310,7 +310,7 @@ void printAddress(SaClmNodeAddressT *nodeAddress)
 
 
 void printCluster(const SaClmClusterNotificationBufferT *buffer)
 void printCluster(const SaClmClusterNotificationBufferT *buffer)
 {
 {
-	printf("  view number: %llu\n", buffer->viewNumber);
+	printf("  view number: %llu\n", (unsigned long long)buffer->viewNumber);
 	printf("  number of items: %u\n\n",  buffer->numberOfItems);
 	printf("  number of items: %u\n\n",  buffer->numberOfItems);
 	int j; for (j=0; j<buffer->numberOfItems; j++)
 	int j; for (j=0; j<buffer->numberOfItems; j++)
 	{
 	{
@@ -320,7 +320,7 @@ void printCluster(const SaClmClusterNotificationBufferT *buffer)
 		printf("    name: "); printName(&(buffer->notification[j].clusterNode.nodeName));
 		printf("    name: "); printName(&(buffer->notification[j].clusterNode.nodeName));
 		printf("    member: "); printBoolean(buffer->notification[j].clusterNode.member);
 		printf("    member: "); printBoolean(buffer->notification[j].clusterNode.member);
 		printf("    booted: "); printDate(buffer->notification[j].clusterNode.bootTimestamp);
 		printf("    booted: "); printDate(buffer->notification[j].clusterNode.bootTimestamp);
-		printf("    initial view number: %llu\n", buffer->notification[j].clusterNode.initialViewNumber);
+		printf("    initial view number: %llu\n", (unsigned long long)buffer->notification[j].clusterNode.initialViewNumber);
 		printf("    cluster change: %s\n", decodeClusterChange(buffer->notification[j].clusterChange));
 		printf("    cluster change: %s\n", decodeClusterChange(buffer->notification[j].clusterChange));
 		printf("\n");
 		printf("\n");
 	}
 	}

+ 24 - 22
test/testevt.c

@@ -204,7 +204,7 @@ void open_callback(SaInvocationT invocation,
 	}
 	}
 	if (invocation != open_invocation) {
 	if (invocation != open_invocation) {
 		printf("ERROR: Unexpected invocation value: e 0x%llx, a 0x%llx\n",
 		printf("ERROR: Unexpected invocation value: e 0x%llx, a 0x%llx\n",
-				open_invocation, invocation);
+				(long long)open_invocation, (long long)invocation);
 	}
 	}
 
 
 	printf("       Close async channel:\n");
 	printf("       Close async channel:\n");
@@ -769,9 +769,9 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 				subscription_id, my_subscription_id);
 				subscription_id, my_subscription_id);
 	}
 	}
 	if (my_event_data_size != event_data_size) {
 	if (my_event_data_size != event_data_size) {
-		printf("ERROR: event data size e=%lld, a=%lld\n", 
-				event_data_size,
-				my_event_data_size);
+		printf("ERROR: event data size e=%llu, a=%llu\n", 
+				(unsigned long long)event_data_size,
+				(unsigned long long)my_event_data_size);
 	}
 	}
 
 
 	evt_pat_get_array.patternsNumber = 4;
 	evt_pat_get_array.patternsNumber = 4;
@@ -797,8 +797,9 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 	}
 	}
 
 
 	if (evt_pat_get_array.patternsNumber != expected_pat_count) {
 	if (evt_pat_get_array.patternsNumber != expected_pat_count) {
-		printf("ERROR: pattern array count not %d: %lld\n", 
-					expected_pat_count, evt_pat_get_array.patternsNumber);
+		printf("ERROR: pattern array count not %d: %llu\n", 
+					expected_pat_count,
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 
 
 	if (expected_pat_count == 0) {
 	if (expected_pat_count == 0) {
@@ -808,10 +809,10 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 		if (evt_pat_get_array.patterns[i].patternSize !=
 		if (evt_pat_get_array.patterns[i].patternSize !=
 				evt_pat_set_array.patterns[i].patternSize) {
 				evt_pat_set_array.patterns[i].patternSize) {
-			printf("ERROR: pattern %d count not equal g=%lld, s=%lld\n",
+			printf("ERROR: pattern %d count not equal g=%llu, s=%llu\n",
 				i,
 				i,
-				evt_pat_get_array.patterns[i].patternSize,
-				evt_pat_set_array.patterns[i].patternSize);
+				(unsigned long long)evt_pat_get_array.patterns[i].patternSize,
+				(unsigned long long)evt_pat_set_array.patterns[i].patternSize);
 			printf("ERROR: pattern %d content g=\"%s\", s=\"%s\"\n",
 			printf("ERROR: pattern %d content g=\"%s\", s=\"%s\"\n",
 				i,
 				i,
 				evt_pat_get_array.patterns[i].pattern,
 				evt_pat_get_array.patterns[i].pattern,
@@ -863,8 +864,9 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 		goto dat_free;
 		goto dat_free;
 	}
 	}
 	if (data_size != event_data_size) {
 	if (data_size != event_data_size) {
-		printf("ERROR: Data size: e=%lld a=%lld\n", 
-				event_data_size, data_size);
+		printf("ERROR: Data size: e=%llu a=%llu\n", 
+				(unsigned long long)event_data_size,
+				(unsigned long long)data_size);
 	}
 	}
 	for (i = 0; i < (data_size/sizeof(long)); i++) {
 	for (i = 0; i < (data_size/sizeof(long)); i++) {
 		if (act_data[i] != exp_data[i]) {
 		if (act_data[i] != exp_data[i]) {
@@ -984,8 +986,8 @@ test_event()
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 	if (evt_pat_get_array.patternsNumber != 0) {
 	if (evt_pat_get_array.patternsNumber != 0) {
-		printf("ERROR: pattern array count not zero: %lld\n", 
-					evt_pat_get_array.patternsNumber);
+		printf("ERROR: pattern array count not zero: %llu\n", 
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 	if (priority != SA_EVT_LOWEST_PRIORITY) {
 	if (priority != SA_EVT_LOWEST_PRIORITY) {
 		printf("ERROR: priority not lowest: 0x%x\n", priority);
 		printf("ERROR: priority not lowest: 0x%x\n", priority);
@@ -1037,16 +1039,16 @@ test_event()
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 	if (evt_pat_get_array.patternsNumber != 4) {
 	if (evt_pat_get_array.patternsNumber != 4) {
-		printf("ERROR: pattern array count not 4: %lld\n", 
-					evt_pat_get_array.patternsNumber);
+		printf("ERROR: pattern array count not 4: %llu\n", 
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 	for (i = 0; i < evt_pat_get_array.patternsNumber; i++) {
 		if (evt_pat_get_array.patterns[i].patternSize !=
 		if (evt_pat_get_array.patterns[i].patternSize !=
 				evt_pat_set_array.patterns[i].patternSize) {
 				evt_pat_set_array.patterns[i].patternSize) {
 			printf("ERROR: pattern %d count not equal g=%lld, s=%lld\n",
 			printf("ERROR: pattern %d count not equal g=%lld, s=%lld\n",
 				i,
 				i,
-				evt_pat_get_array.patterns[i].patternSize,
-				evt_pat_set_array.patterns[i].patternSize);
+				(unsigned long long)evt_pat_get_array.patterns[i].patternSize,
+				(unsigned long long)evt_pat_set_array.patterns[i].patternSize);
 			printf("ERROR: pattern %d content g=\"%s\", s=\"%s\"\n",
 			printf("ERROR: pattern %d content g=\"%s\", s=\"%s\"\n",
 				i,
 				i,
 				evt_pat_get_array.patterns[i].pattern,
 				evt_pat_get_array.patterns[i].pattern,
@@ -1414,7 +1416,7 @@ multi_test_callback1(SaEvtSubscriptionIdT my_subscription_id,
 
 
 	if (evt_pat_get_array.patternsNumber != 1) {
 	if (evt_pat_get_array.patternsNumber != 1) {
 		printf("ERROR: pattern array count not 1: %lld\n", 
 		printf("ERROR: pattern array count not 1: %lld\n", 
-					evt_pat_get_array.patternsNumber);
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 
 
 evt_free:
 evt_free:
@@ -1764,8 +1766,8 @@ multi_test_callback2(SaEvtSubscriptionIdT my_subscription_id,
 	}
 	}
 
 
 	if (evt_pat_get_array.patternsNumber != 1) {
 	if (evt_pat_get_array.patternsNumber != 1) {
-		printf("ERROR: pattern array count not 1: %lld\n", 
-					evt_pat_get_array.patternsNumber);
+		printf("ERROR: pattern array count not 1: %llu\n", 
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 
 
 evt_free:
 evt_free:
@@ -2064,8 +2066,8 @@ multi_test_callback3(SaEvtSubscriptionIdT my_subscription_id,
 	}
 	}
 
 
 	if (evt_pat_get_array.patternsNumber != 1) {
 	if (evt_pat_get_array.patternsNumber != 1) {
-		printf("ERROR: pattern array count not 1: %lld\n", 
-					evt_pat_get_array.patternsNumber);
+		printf("ERROR: pattern array count not 1: %llu\n", 
+					(unsigned long long)evt_pat_get_array.patternsNumber);
 	}
 	}
 
 
 evt_free:
 evt_free:

+ 9 - 9
test/testlck.c

@@ -54,8 +54,8 @@ void testLckResourceOpenCallback (
 	SaLckResourceHandleT lockResourceHandle,
 	SaLckResourceHandleT lockResourceHandle,
 	SaAisErrorT error)
 	SaAisErrorT error)
 {
 {
-	printf ("testLckResourceOpenCallback invocation %lld error %d\n",
-		invocation, error);
+	printf ("testLckResourceOpenCallback invocation %llu error %d\n",
+		(unsigned long long)invocation, error);
 	resource_handle_async = lockResourceHandle;
 	resource_handle_async = lockResourceHandle;
 }
 }
 
 
@@ -64,8 +64,8 @@ void testLckLockGrantCallback (
 	SaLckLockStatusT lockStatus,
 	SaLckLockStatusT lockStatus,
 	SaAisErrorT error)
 	SaAisErrorT error)
 {
 {
-	printf ("testLckLockGrantCallback invocation %lld status %d error %d\n",
-		invocation, lockStatus, error);
+	printf ("testLckLockGrantCallback invocation %llu status %d error %d\n",
+		(unsigned long long)invocation, lockStatus, error);
 }
 }
 
 
 SaLckLockIdT pr_lock_id;
 SaLckLockIdT pr_lock_id;
@@ -77,11 +77,11 @@ void testLckLockWaiterCallback (
         SaLckLockModeT modeRequested)
         SaLckLockModeT modeRequested)
 {
 {
 	int result;
 	int result;
-	printf ("waiter callback mode held %d mode requested %d lock id %lld\n",
+	printf ("waiter callback mode held %d mode requested %d lock id %llu\n",
 		modeHeld,
 		modeHeld,
 		modeRequested,
 		modeRequested,
-		lockId);
-	printf ("pr lock id %lld\n", pr_lock_id);
+		(unsigned long long)lockId);
+	printf ("pr lock id %llu\n", (unsigned long long)pr_lock_id);
 	result = saLckResourceUnlockAsync (
 	result = saLckResourceUnlockAsync (
 		25,
 		25,
 		lockId);
 		lockId);
@@ -92,7 +92,8 @@ void testLckResourceUnlockCallback (
         SaInvocationT invocation,
         SaInvocationT invocation,
         SaAisErrorT error)
         SaAisErrorT error)
 {
 {
-	printf ("testLckResourceUnlockCallback async invocation %lld error %d\n", invocation, error);
+	printf ("testLckResourceUnlockCallback async invocation %llu error %d\n",
+		(unsigned long long)invocation, error);
 }
 }
 
 
 SaLckCallbacksT callbacks = {
 SaLckCallbacksT callbacks = {
@@ -159,7 +160,6 @@ int main (void) {
 		SA_TIME_ONE_SECOND,
 		SA_TIME_ONE_SECOND,
 		&resource_handle);
 		&resource_handle);
 	printf ("saLckResourceOpen %d (should be 12)\n", result);
 	printf ("saLckResourceOpen %d (should be 12)\n", result);
-printf ("HANDLE %llx\n", resource_handle);
 
 
 	result = saLckResourceClose (resource_handle);
 	result = saLckResourceClose (resource_handle);
 	printf ("saLckResourceClose %d (should be 9)\n", result);
 	printf ("saLckResourceClose %d (should be 9)\n", result);