Explorar el Código

em64t support

(Logical change 1.141)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@505 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake hace 21 años
padre
commit
4196c44187
Se han modificado 15 ficheros con 91 adiciones y 56 borrados
  1. 27 9
      exec/Makefile
  2. 0 3
      exec/totemsrp.c
  3. 1 1
      include/evs.h
  4. 2 2
      lib/Makefile
  5. 0 1
      lib/clm.c
  6. 17 7
      test/ckptstress.c
  7. 4 4
      test/evtbench.c
  8. 4 4
      test/publish.c
  9. 2 2
      test/sa_error.c
  10. 5 5
      test/subscription.c
  11. 0 1
      test/testamf.c
  12. 2 2
      test/testckpt.c
  13. 1 1
      test/testclm.c
  14. 24 12
      test/testevt.c
  15. 2 2
      test/testparse.c

+ 27 - 9
exec/Makefile

@@ -1,4 +1,4 @@
-# Copyright (c) 2002-2004 MontaVista Software, Inc.
+# Copyright (c) 2002-2005 MontaVista Software, Inc.
 # 
 # 
 # All rights reserved.
 # All rights reserved.
 # 
 # 
@@ -29,16 +29,16 @@
 # THE POSSIBILITY OF SUCH DAMAGE.
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 
 # Production mode flags
 # Production mode flags
-CFLAGS = -O3 -Wall -fomit-frame-pointer -fPIC
+CFLAGS = -O3 -Wall -fomit-frame-pointer
 LDFLAGS = 
 LDFLAGS = 
 
 
 # Debug mode flags
 # Debug mode flags
-#CFLAGS = -g -Wall -fPIC
+#CFLAGS = -g -Wall
 ##-DDEBUG
 ##-DDEBUG
-#LDFLAGS = -g -fPIC
+#LDFLAGS = -g
 
 
 # Profile mode flags
 # Profile mode flags
-#CFLAGS = -O2 -pg -fPIC
+#CFLAGS = -O2 -pg
 #LDFLAGS = -pg
 #LDFLAGS = -pg
 
 
 # Code Coverage with lcov flgs
 # Code Coverage with lcov flgs
@@ -51,14 +51,15 @@ TOTEM_OBJS = aispoll.o totemsrp.o totempg.o tlist.o hdb.o crypto.o
 EXEC_SRC = main.c clm.c amf.c ckpt.c evt.c evs.c parse.c print.c mempool.c \
 EXEC_SRC = main.c clm.c amf.c ckpt.c evt.c evs.c parse.c print.c mempool.c \
 		util.c
 		util.c
 EXEC_OBJS = main.o clm.o amf.o ckpt.o evt.o evs.o parse.o print.o mempool.o \
 EXEC_OBJS = main.o clm.o amf.o ckpt.o evt.o evs.o parse.o print.o mempool.o \
-		util.o libtotem.a
+		util.o
+EXEC_LIBS = libtotem.a
 
 
 OBJS = $(TOTEM_OBJS) $(EXEC_OBJS)
 OBJS = $(TOTEM_OBJS) $(EXEC_OBJS)
 
 
 all:libtotem.a libtotem.so.1.0 aisexec keygen
 all:libtotem.a libtotem.so.1.0 aisexec keygen
 
 
 aisexec: $(EXEC_OBJS)
 aisexec: $(EXEC_OBJS)
-	$(CC) $(LDFLAGS) $(EXEC_OBJS) $(LIBS) -o aisexec
+	$(CC) $(LDFLAGS) $(EXEC_OBJS) $(EXEC_LIBS) -o aisexec
 
 
 libtotem.a: $(TOTEM_OBJS)
 libtotem.a: $(TOTEM_OBJS)
 	$(AR) -rc libtotem.a $(TOTEM_OBJS)
 	$(AR) -rc libtotem.a $(TOTEM_OBJS)
@@ -78,8 +79,25 @@ clean:
 depend:
 depend:
 	makedepend -Y -- $(CFLAGS) $(EXEC_SRC) $(TOTEM_SRC) > /dev/null 2>&1
 	makedepend -Y -- $(CFLAGS) $(EXEC_SRC) $(TOTEM_SRC) > /dev/null 2>&1
 
 
-%.o: %.c
-	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+# -fPIC rules required for lib totem
+aispoll.o: aispoll.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
+totemsrp.o: totemsrp.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
+totempg.o: totempg.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
+tlist.o: tlist.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
+hdb.o: hdb.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
+crypto.o: crypto.c
+	$(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
+
 # DO NOT DELETE
 # DO NOT DELETE
 
 
 main.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h
 main.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h

+ 0 - 3
exec/totemsrp.c

@@ -2846,9 +2846,6 @@ static void messages_deliver_to_app (int skip, int *start_point, int end_point)
 		sort_queue_item_p = ptr;
 		sort_queue_item_p = ptr;
 
 
 		mcast = sort_queue_item_p->iovec[0].iov_base;
 		mcast = sort_queue_item_p->iovec[0].iov_base;
-		if (mcast == (struct mcast *)0xdeadbeef) {
-			printf ("seq %d\n", sort_queue_item_p->iovec[0].iov_len);
-		}
 		assert (mcast != (struct mcast *)0xdeadbeef);
 		assert (mcast != (struct mcast *)0xdeadbeef);
 
 
 		/*
 		/*

+ 1 - 1
include/evs.h

@@ -36,7 +36,7 @@
 
 
 #include <netinet/in.h>
 #include <netinet/in.h>
 
 
-typedef unsigned long long evs_handle_t;
+typedef uint64_t evs_handle_t;
 
 
 typedef enum {
 typedef enum {
 	EVS_DISPATCH_ONE,
 	EVS_DISPATCH_ONE,

+ 2 - 2
lib/Makefile

@@ -1,4 +1,4 @@
-# Copyright (c) 2002-2004 MontaVista Software, Inc.
+# Copyright (c) 2002-2005 MontaVista Software, Inc.
 # 
 # 
 # All rights reserved.
 # All rights reserved.
 # 
 # 
@@ -62,7 +62,7 @@ libais.so.1.0: util.o amf.o clm.o ckpt.o evt.o
 	ln -s libais.so.1.0 libais.so.1
 	ln -s libais.so.1.0 libais.so.1
 	ln -s libais.so.1.0 libais.so
 	ln -s libais.so.1.0 libais.so
 	
 	
-libevs.a: util.o amf.o evs.o
+libevs.a: util.o evs.o
 	$(AR) -rc libevs.a util.o evs.o
 	$(AR) -rc libevs.a util.o evs.o
 
 
 libevs.so.1.0: util.o evs.o
 libevs.so.1.0: util.o evs.o

+ 0 - 1
lib/clm.c

@@ -358,7 +358,6 @@ error_unlock:
 	pthread_mutex_unlock (&clmInstance->mutex);
 	pthread_mutex_unlock (&clmInstance->mutex);
 error_put:
 error_put:
 	saHandleInstancePut (&clmHandleDatabase, clmHandle);
 	saHandleInstancePut (&clmHandleDatabase, clmHandle);
-error_nounlock:
 	return (error);
 	return (error);
 }
 }
 
 

+ 17 - 7
test/ckptstress.c

@@ -46,6 +46,11 @@
 #include "saCkpt.h"
 #include "saCkpt.h"
 
 
 int ckptinv;
 int ckptinv;
+
+struct thread_data {
+	int thread_no;
+};
+
 void printSaNameT (SaNameT *name)
 void printSaNameT (SaNameT *name)
 {
 {
 	int i;
 	int i;
@@ -148,14 +153,14 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
 
 
 void *th_dispatch (void *arg)
 void *th_dispatch (void *arg)
 {
 {
-	int th = (int)arg;
+	struct thread_data *td = (struct thread_data *)arg;
 	SaCkptHandleT ckptHandle;
 	SaCkptHandleT ckptHandle;
 	SaCkptCheckpointHandleT handle;
 	SaCkptCheckpointHandleT handle;
 	SaErrorT error;
 	SaErrorT error;
 	int i;
 	int i;
 	SaUint32T erroroneousVectorIndex = 0;
 	SaUint32T erroroneousVectorIndex = 0;
 
 
-    error = saCkptInitialize (&ckptHandle, &callbacks, &version);
+	error = saCkptInitialize (&ckptHandle, &callbacks, &version);
 
 
 	error = saCkptCheckpointOpen (ckptHandle,
 	error = saCkptCheckpointOpen (ckptHandle,
 		&checkpointName,
 		&checkpointName,
@@ -166,11 +171,12 @@ void *th_dispatch (void *arg)
 	for (i = 0; i < 1000; i++) {
 	for (i = 0; i < 1000; i++) {
 		error = saCkptCheckpointWrite (handle,
 		error = saCkptCheckpointWrite (handle,
 			WriteVectorElements,
 			WriteVectorElements,
-			1,/* placing two here with only one vector element causes an assertion failure !! */
+			1,
 			&erroroneousVectorIndex);
 			&erroroneousVectorIndex);
-		printf ("Thread %d: Attempt %d: error %d\n", th, i, error);
+		printf ("Thread %d: Attempt %d: error %d\n",
+			td->thread_no, i, error);
 		if (error != SA_OK) {
 		if (error != SA_OK) {
-			printf ("Thread %d: Error from write.\n", th);
+			printf ("Thread %d: Error from write.\n", td->thread_no);
 		}
 		}
 	}
 	}
 
 
@@ -186,7 +192,7 @@ int main (void) {
 	int i;
 	int i;
 	pthread_t dispatch_thread;
 	pthread_t dispatch_thread;
 
 
-    error = saCkptInitialize (&ckptHandle, &callbacks, &version);
+	error = saCkptInitialize (&ckptHandle, &callbacks, &version);
 
 
 	error = saCkptCheckpointOpen (ckptHandle,
 	error = saCkptCheckpointOpen (ckptHandle,
 		&checkpointName,
 		&checkpointName,
@@ -209,7 +215,11 @@ printf ("create2 error is %d\n", error);
 printf ("create2 error is %d\n", error);
 printf ("create2 error is %d\n", error);
 
 
 	for (i = 0; i < 40; i++) {
 	for (i = 0; i < 40; i++) {
-		pthread_create (&dispatch_thread, NULL, th_dispatch, (void *)i);
+		struct thread_data *td;
+
+		td = malloc (sizeof (struct thread_data));
+		td->thread_no = i;
+		pthread_create (&dispatch_thread, NULL, th_dispatch, td);
 	}
 	}
 	pthread_join (dispatch_thread, NULL);
 	pthread_join (dispatch_thread, NULL);
 
 

+ 4 - 4
test/evtbench.c

@@ -217,7 +217,7 @@ test_pub()
 		tv_elapsed.tv_usec / 1000000.0)) * 1000000.0));
 		tv_elapsed.tv_usec / 1000000.0)) * 1000000.0));
 
 
 exit (1);
 exit (1);
-	printf("Published event ID: 0x%llx\n", event_id);
+	printf("Published event ID: %llx\n", (unsigned long long)event_id);
 
 
 	/*
 	/*
 	 * See if we got the event
 	 * See if we got the event
@@ -289,7 +289,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", event_handle);
+	printf("event_handle %llx\n", (unsigned long long)event_handle);
 	printf("event data size %d\n", event_data_size);
 	printf("event data size %d\n", event_data_size);
 
 
 	evt_pat_get_array.patternsNumber = 4;
 	evt_pat_get_array.patternsNumber = 4;
@@ -312,9 +312,9 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	}
 	}
 
 
 	printf("priority: 0x%x\n", priority);
 	printf("priority: 0x%x\n", priority);
-	printf("retention: 0x%llx\n", retention_time);
+	printf("retention: %llx\n", (unsigned long long)retention_time);
 	printf("publisher name content: \"%s\"\n", publisher_name.value); 
 	printf("publisher name content: \"%s\"\n", publisher_name.value); 
-	printf("event id: 0x%llx\n", event_id);
+	printf("event id: %llx\n", (unsigned long long)event_id);
 evt_free:
 evt_free:
 	result = saEvtEventFree(event_handle);
 	result = saEvtEventFree(event_handle);
 	printf("event free result: %d\n", result);
 	printf("event free result: %d\n", result);

+ 4 - 4
test/publish.c

@@ -205,7 +205,7 @@ test_pub()
 		exit(result);
 		exit(result);
 	}
 	}
 
 
-	printf("Published event ID: 0x%llx\n", event_id);
+	printf("Published event ID: 0x%llx\n", (unsigned long long)event_id);
 	}
 	}
 
 
 	/*
 	/*
@@ -287,7 +287,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", event_handle);
+	printf("event_handle %llx\n", (unsigned long long)event_handle);
 	printf("event data size %d\n", event_data_size);
 	printf("event data size %d\n", event_data_size);
 
 
 	evt_pat_get_array.patternsNumber = 4;
 	evt_pat_get_array.patternsNumber = 4;
@@ -311,9 +311,9 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	}
 	}
 
 
 	printf("priority: 0x%x\n", priority);
 	printf("priority: 0x%x\n", priority);
-	printf("retention: 0x%llx\n", retention_time);
+	printf("retention: 0x%llx\n", (unsigned long long)retention_time);
 	printf("publisher name content: \"%s\"\n", publisher_name.value); 
 	printf("publisher name content: \"%s\"\n", publisher_name.value); 
-	printf("event id: 0x%llx\n", event_id);
+	printf("event id: 0x%llx\n", (unsigned long long)event_id);
 evt_free:
 evt_free:
 	result = saEvtEventFree(event_handle);
 	result = saEvtEventFree(event_handle);
 	get_sa_error(result, result_buf, result_buf_len);
 	get_sa_error(result, result_buf, result_buf_len);

+ 2 - 2
test/sa_error.c

@@ -48,11 +48,11 @@ int get_sa_error(SaErrorT error, char *str, int len)
 }
 }
 
 
 char *get_sa_error_b (SaAisErrorT error) {
 char *get_sa_error_b (SaAisErrorT error) {
-	return (sa_error_list[error]);
+	return ((char *)sa_error_list[error]);
 }
 }
 
 
 char *get_test_output (SaAisErrorT result, SaAisErrorT expected) {
 char *get_test_output (SaAisErrorT result, SaAisErrorT expected) {
-        static *test_result[256];
+static char test_result[256];
 
 
         if (result == expected) {
         if (result == expected) {
                 return ("PASSED");
                 return ("PASSED");

+ 5 - 5
test/subscription.c

@@ -235,7 +235,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 	if (!quiet)
 	if (!quiet)
 		dprintf("sub ID: %x\n", subscription_id);
 		dprintf("sub ID: %x\n", subscription_id);
 	if (!quiet)
 	if (!quiet)
-		dprintf("event_handle %llx\n", event_handle);
+		dprintf("event_handle %llx\n", (unsigned long long)event_handle);
 	if (!quiet)
 	if (!quiet)
 		dprintf("event data size %d\n", event_data_size);
 		dprintf("event data size %d\n", event_data_size);
 
 
@@ -266,7 +266,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		}
 		}
 
 
 		dprintf("priority: 0x%x\n", priority);
 		dprintf("priority: 0x%x\n", priority);
-		dprintf("retention: 0x%llx\n", retention_time);
+		dprintf("retention: 0x%llx\n", (unsigned long long)retention_time);
 		dprintf("publisher name content: \"%s\"\n", 
 		dprintf("publisher name content: \"%s\"\n", 
 				publisher_name.value); 
 				publisher_name.value); 
 	}
 	}
@@ -282,7 +282,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 		}
 		}
 	}
 	}
 	if (quiet < 2) {
 	if (quiet < 2) {
-		dprintf("event id: 0x%016llx\n", event_id);
+		dprintf("event id: 0x%016llx\n", (unsigned long long)event_id);
 	}
 	}
 	if (quiet == 2) {
 	if (quiet == 2) {
 		if ((++evt_count % EVT_FREQ) == 0) {
 		if ((++evt_count % EVT_FREQ) == 0) {
@@ -305,8 +305,8 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
 				last_event_id[idx]++;
 				last_event_id[idx]++;
 				if (last_event_id[idx] != event_id) {
 				if (last_event_id[idx] != event_id) {
 					dprintf("*** expected %016llx got %016llx event_id\n",
 					dprintf("*** expected %016llx got %016llx event_id\n",
-					last_event_id[idx],
-					event_id);
+					(unsigned long long)last_event_id[idx],
+					(unsigned long long)event_id);
 				last_event_id[idx] = event_id;
 				last_event_id[idx] = event_id;
 				}
 				}
 				break;
 				break;

+ 0 - 1
test/testamf.c

@@ -253,7 +253,6 @@ int main (int argc, char **argv) {
 	int select_fd;
 	int select_fd;
 	fd_set read_fds;
 	fd_set read_fds;
 	SaNameT compName;
 	SaNameT compName;
-	SaNameT proxyCompName;
 	SaNameT csiName;
 	SaNameT csiName;
 	SaNameT compname_get_name;
 	SaNameT compname_get_name;
 	SaAmfReadinessStateT readinessState;
 	SaAmfReadinessStateT readinessState;

+ 2 - 2
test/testckpt.c

@@ -391,10 +391,10 @@ printf ("Please wait, testing expiry of checkpoint sections.\n");
 		if (error == SA_OK) {
 		if (error == SA_OK) {
 			printf ("Section '%s' expires %llx size %d state %x update %llx\n",
 			printf ("Section '%s' expires %llx size %d state %x update %llx\n",
 				sectionDescriptor.sectionId.id,
 				sectionDescriptor.sectionId.id,
-				sectionDescriptor.expirationTime,
+				(unsigned long long)sectionDescriptor.expirationTime,
 				sectionDescriptor.sectionSize,
 				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");

+ 1 - 1
test/testclm.c

@@ -77,7 +77,7 @@ void printSaClmClusterNodeT (char *description, SaClmClusterNodeT *clusterNode)
 
 
 	printf ("\tMember is %d\n", clusterNode->member);
 	printf ("\tMember is %d\n", clusterNode->member);
 
 
-	printf ("\tTimestamp is %llx nanoseconds\n", clusterNode->bootTimestamp);
+	printf ("\tTimestamp is %llx nanoseconds\n", (unsigned long long)clusterNode->bootTimestamp);
 }
 }
 
 
 void NodeGetCallback (
 void NodeGetCallback (

+ 24 - 12
test/testevt.c

@@ -689,7 +689,7 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 
 
 	if (my_event_id != event_id) {
 	if (my_event_id != event_id) {
 		printf("ERROR: Call back event ID error: e=%llx, a=%llx\n",
 		printf("ERROR: Call back event ID error: e=%llx, a=%llx\n",
-				event_id, my_event_id);
+			(unsigned long long)event_id, (unsigned long long)my_event_id);
 	}
 	}
 
 
 	if (evt_pat_get_array.patternsNumber != 4) {
 	if (evt_pat_get_array.patternsNumber != 4) {
@@ -726,7 +726,8 @@ event_callback(SaEvtSubscriptionIdT my_subscription_id,
 	}
 	}
 	if (retention_time != my_retention_time) {
 	if (retention_time != my_retention_time) {
 		printf("ERROR: retention: e=0x%llx a=0x%llx\n", 
 		printf("ERROR: retention: e=0x%llx a=0x%llx\n", 
-				retention_time, my_retention_time);
+			(unsigned long long)retention_time,
+			(unsigned long long)my_retention_time);
 	}
 	}
 	if (publisher_name.length != my_publisher_name.length) {
 	if (publisher_name.length != my_publisher_name.length) {
 		printf("ERROR: publisher name length: e=%d, a=%d\n", 
 		printf("ERROR: publisher name length: e=%d, a=%d\n", 
@@ -867,13 +868,15 @@ test_event()
 		printf("ERROR: priority not lowest: 0x%x\n", priority);
 		printf("ERROR: priority not lowest: 0x%x\n", priority);
 	}
 	}
 	if (retention_time != 0) {
 	if (retention_time != 0) {
-		printf("ERROR: retention time not zero: %0llx\n", retention_time);
+		printf("ERROR: retention time not zero: %0llx\n",
+			(unsigned long long)retention_time);
 	}
 	}
 	if (publisher_name.length != 0) {
 	if (publisher_name.length != 0) {
 		printf("ERROR: publisher name not null: %s\n", publisher_name.value);
 		printf("ERROR: publisher name not null: %s\n", publisher_name.value);
 	}
 	}
 	if (event_id != 0) {
 	if (event_id != 0) {
-		printf("ERROR: event id not zero: 0x%llx\n", event_id);
+		printf("ERROR: event id not zero: 0x%llx\n",
+			(unsigned long long)event_id);
 	}
 	}
 
 
 
 
@@ -940,7 +943,8 @@ test_event()
 	}
 	}
 	if (retention_time != test_ret_time) {
 	if (retention_time != test_ret_time) {
 		printf("ERROR: retention: e=0x%llx a=0x%llx\n", 
 		printf("ERROR: retention: e=0x%llx a=0x%llx\n", 
-				test_ret_time, retention_time);
+			(unsigned long long)test_ret_time,
+			(unsigned long long)retention_time);
 	}
 	}
 	if (publisher_name.length != test_pub_name.length) {
 	if (publisher_name.length != test_pub_name.length) {
 		printf("ERROR: publisher name length: e=%d, a=%d\n", 
 		printf("ERROR: publisher name length: e=%d, a=%d\n", 
@@ -956,7 +960,8 @@ test_event()
 	}
 	}
 
 
 	if (event_id != 0) {
 	if (event_id != 0) {
-		printf("ERROR: event id not zero: 0x%llx\n", event_id);
+		printf("ERROR: event id not zero: 0x%llx\n",
+			(unsigned long long)event_id);
 	}
 	}
 
 
 	/*
 	/*
@@ -1190,7 +1195,8 @@ multi_test_callback1(SaEvtSubscriptionIdT my_subscription_id,
 		printf("ERROR: Received event 3 but not subscribed\n");
 		printf("ERROR: Received event 3 but not subscribed\n");
 		goto evt_free;
 		goto evt_free;
 	} else {
 	} else {
-		printf("ERROR: Received event %llx but not sent\n", my_event_id);
+		printf("ERROR: Received event %llx but not sent\n",
+			(unsigned long long)my_event_id);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 
 
@@ -1764,8 +1770,11 @@ multi_test_callback3(SaEvtSubscriptionIdT my_subscription_id,
 	}
 	}
 
 
 	if ((my_event_id != event_id1) && (my_event_id != event_id2)) {
 	if ((my_event_id != event_id1) && (my_event_id != event_id2)) {
-		printf("ERROR: Received wrong event ID %llx\n", my_event_id);
-		printf("       id1 %llx, id2 %llx\n", event_id1, event_id2);
+		printf("ERROR: Received wrong event ID %llx\n",
+			(unsigned long long)my_event_id);
+		printf("       id1 %llx, id2 %llx\n",
+			(unsigned long long)event_id1,
+			(unsigned long long)event_id2);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 
 
@@ -2193,7 +2202,8 @@ test_retention()
 	}
 	}
 	if (retained_id != event_id) {
 	if (retained_id != event_id) {
 		printf("ERROR: received the wrong event: e=%llx, a=%llx\n",
 		printf("ERROR: received the wrong event: e=%llx, a=%llx\n",
-			event_id, retained_id);
+			(unsigned long long)event_id,
+			(unsigned long long)retained_id);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 
 
@@ -2316,7 +2326,8 @@ test_retention()
 	}
 	}
 	if (retained_id != event_id) {
 	if (retained_id != event_id) {
 		printf("ERROR: received the wrong event: e=%llx, a=%llx\n",
 		printf("ERROR: received the wrong event: e=%llx, a=%llx\n",
-			event_id, retained_id);
+			(unsigned long long)event_id,
+			(unsigned long long)retained_id);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 
 
@@ -2418,7 +2429,8 @@ unlink_chan_callback(SaEvtSubscriptionIdT my_subscription_id,
 	} else if (my_event_id == event_id2) {
 	} else if (my_event_id == event_id2) {
 		exp_sub_id = sub2;
 		exp_sub_id = sub2;
 	} else {
 	} else {
-		printf("ERROR: Received event %llx but not sent\n", my_event_id);
+		printf("ERROR: Received event %llx but not sent\n",
+			(unsigned long long)my_event_id);
 		goto evt_free;
 		goto evt_free;
 	}
 	}
 
 

+ 2 - 2
test/testparse.c

@@ -39,10 +39,10 @@
 
 
 int main (void)
 int main (void)
 {
 {
-	char *error;
+#ifdef CODE_COVERAGE_COMPILE_OUT
 	int result;
 	int result;
+	int error;
 
 
-#ifdef CODE_COVERAGE_COMPILE_OUT
 	result = amfReadGroups (&error);
 	result = amfReadGroups (&error);
 	if (result == -1) {
 	if (result == -1) {
 		printf ("Parse Error: %s\n", error);
 		printf ("Parse Error: %s\n", error);