From 1e17751d0d41cc731d9d637784bc03a270f52802 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 11 Mar 2010 00:27:04 +0000 Subject: [PATCH] Remove warnings. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2682 fd59a12c-fef9-0310-b244-a6a79926bd2f --- include/corosync/engine/coroapi.h | 10 ++++++---- services/cpg.c | 2 +- tools/corosync-keygen.c | 2 +- tools/corosync-objctl.c | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/corosync/engine/coroapi.h b/include/corosync/engine/coroapi.h index b3c97774..7639ab1c 100644 --- a/include/corosync/engine/coroapi.h +++ b/include/corosync/engine/coroapi.h @@ -653,6 +653,11 @@ struct corosync_service_engine_iface_ver0 { struct corosync_service_engine *(*corosync_get_service_engine_ver0) (void); }; +typedef void (*sync_init_v1_fn_t) ( + const unsigned int *member_list, + size_t member_list_entries, + const struct memb_ring_id *ring_id) ; + struct corosync_service_engine { const char *name; unsigned short id; @@ -679,10 +684,7 @@ struct corosync_service_engine { const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id); enum cs_sync_mode sync_mode; - void (*sync_init) ( - const unsigned int *member_list, - size_t member_list_entries, - const struct memb_ring_id *ring_id); + sync_init_v1_fn_t sync_init; int (*sync_process) (void); void (*sync_activate) (void); void (*sync_abort) (void); diff --git a/services/cpg.c b/services/cpg.c index 7b57d577..ede426f2 100644 --- a/services/cpg.c +++ b/services/cpg.c @@ -338,7 +338,7 @@ struct corosync_service_engine cpg_service_engine = { .exec_engine = cpg_exec_engine, .exec_engine_count = sizeof (cpg_exec_engine) / sizeof (struct corosync_exec_handler), .sync_mode = CS_SYNC_V1_APIV2, - .sync_init = cpg_sync_init_v2, + .sync_init = (sync_init_v1_fn_t)cpg_sync_init_v2, .sync_process = cpg_sync_process, .sync_activate = cpg_sync_activate, .sync_abort = cpg_sync_abort diff --git a/tools/corosync-keygen.c b/tools/corosync-keygen.c index 96966a67..c842fd19 100644 --- a/tools/corosync-keygen.c +++ b/tools/corosync-keygen.c @@ -86,7 +86,7 @@ retry_read: } bytes_read += res; if (bytes_read != sizeof (key)) { - printf ("Press keys on your keyboard to generate entropy (bits = %d).\n", bytes_read * 8); + printf ("Press keys on your keyboard to generate entropy (bits = %d).\n", (int)(bytes_read * 8)); goto retry_read; } close (random_fd); diff --git a/tools/corosync-objctl.c b/tools/corosync-objctl.c index 8e2d7541..693c312d 100644 --- a/tools/corosync-objctl.c +++ b/tools/corosync-objctl.c @@ -123,11 +123,11 @@ static void print_key (char *key_name, void *value, size_t value_len, confdb_val *(uint32_t*)value); break; case CONFDB_VALUETYPE_INT64: - printf ("%s=%lld\n", key_name, + printf ("%s=%"PRIi64"\n", key_name, *(int64_t*)value); break; case CONFDB_VALUETYPE_UINT64: - printf ("%s=%llu\n", key_name, + printf ("%s=%"PRIu64"\n", key_name, *(uint64_t*)value); break; case CONFDB_VALUETYPE_STRING: