From 6f1394f5b369d13759dbbd6fb4e03b5a5f92180b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 6 May 2016 15:21:51 +0000 Subject: [PATCH] fix compiler warnings --- src/psyc/gnunet-service-psyc.c | 4 ++-- src/psyc/test_psyc.c | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 3edc0295c..bd81dabb1 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c @@ -2265,7 +2265,7 @@ client_recv_psyc_message (void *cls, struct GNUNET_SERVER_Client *client, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%p Message payload too large: %u < %u.\n", chn, - GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD, + (unsigned int) GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD, (unsigned int) (size - sizeof (*msg))); GNUNET_break (0); transmit_cancel (chn, client); @@ -2310,7 +2310,7 @@ store_recv_membership_store_result (void *cls, { struct Operation *op = cls; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p GNUNET_PSYCSTORE_membership_store() returned %" PRId64 " (%.s)\n", + "%p GNUNET_PSYCSTORE_membership_store() returned %" PRId64 " (%.*s)\n", op->chn, result, (int) err_msg_size, diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index 5ea83dd63..402b17b96 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c @@ -336,7 +336,10 @@ state_get_var (void *cls, const struct GNUNET_MessageHeader *mod, uint32_t value_size, uint32_t full_value_size) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Got state var: %s\n%.*s\n", name, value_size, value); + "Got state var: %s\n%.*s\n", + name, + (int) value_size, + (const char *) value); } @@ -348,7 +351,9 @@ slave_state_get_prefix_result (void *cls, int64_t result, { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "slave_state_get_prefix:\t%" PRId64 " (%.s)\n", - result, err_msg_size, err_msg); + result, + (int) err_msg_size, + (const char *) err_msg); // FIXME: GNUNET_assert (2 == result); end (); } @@ -442,7 +447,9 @@ slave_history_replay_result (void *cls, int64_t result, { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "slave_history_replay:\t%" PRId64 " (%.*s)\n", - result, err_msg_size, err_msg); + result, + (int) err_msg_size, + (const char *) err_msg); GNUNET_assert (9 == result); master_state_get (); @@ -470,7 +477,9 @@ master_history_replay_result (void *cls, int64_t result, { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "master_history_replay:\t%" PRId64 " (%.*s)\n", - result, err_msg_size, err_msg); + result, + (int) err_msg_size, + (const char *) err_msg); GNUNET_assert (9 == result); slave_history_replay (); @@ -498,7 +507,9 @@ slave_history_replay_latest_result (void *cls, int64_t result, { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "slave_history_replay_latest:\t%" PRId64 " (%.*s)\n", - result, err_msg_size, err_msg); + result, + (int) err_msg_size, + (const char *) err_msg); GNUNET_assert (9 == result); master_history_replay (); -- 2.25.1