From: Christian Grothoff Date: Fri, 6 May 2016 14:44:08 +0000 (+0000) Subject: fixing compiler warnings X-Git-Tag: initial-import-from-subversion-38251~905 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e8cf81fdb3fdaef59b49da8f6e952a3225ab326e;p=oweals%2Fgnunet.git fixing compiler warnings --- diff --git a/po/POTFILES.in b/po/POTFILES.in index f0822c03c..d98e3458f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -214,6 +214,10 @@ src/identity-provider/identity_provider_api.c src/identity-provider/identity_token.c src/identity-provider/plugin_rest_identity_provider.c src/jsonapi/jsonapi.c +src/jsonapi/jsonapi_document.c +src/jsonapi/jsonapi_error.c +src/jsonapi/jsonapi_relationship.c +src/jsonapi/jsonapi_resource.c src/json/json.c src/json/json_generator.c src/json/json_helper.c @@ -322,6 +326,7 @@ src/set/ibf.c src/set/ibf_sim.c src/set/set_api.c src/social/gnunet-service-social.c +src/social/gnunet-social.c src/social/social_api.c src/statistics/gnunet-service-statistics.c src/statistics/gnunet-statistics.c diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index 5e22d4b47..87af31f5f 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c @@ -698,12 +698,13 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) if (GNUNET_YES == l->verbose) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", c_m, - delta.rel_value_us, - mlt->total_bytes_sent, - mlt->total_bytes_received, - mlt->total_throughput_send, - mlt->total_throughput_recv); + "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", + c_m, + (unsigned long long) delta.rel_value_us, + mlt->total_bytes_sent, + mlt->total_bytes_received, + mlt->total_throughput_send, + mlt->total_throughput_recv); } mlt->slaves_log = GNUNET_malloc (bp->peer->num_partners * @@ -783,13 +784,13 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) if (GNUNET_YES == l->verbose) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", - c_m, c_s, - delta.rel_value_us, - mlt->total_bytes_sent, - mlt->total_bytes_received, - slt->throughput_sent, - slt->throughput_recv); + "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", + c_m, c_s, + (unsigned long long) delta.rel_value_us, + mlt->total_bytes_sent, + mlt->total_bytes_received, + slt->throughput_sent, + slt->throughput_recv); } else GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/ats-tests/ats-testing-preferences.c b/src/ats-tests/ats-testing-preferences.c index 856c8de4b..256fa844b 100644 --- a/src/ats-tests/ats-testing-preferences.c +++ b/src/ats-tests/ats-testing-preferences.c @@ -143,13 +143,13 @@ set_pref_task (void *cls) */ struct PreferenceGenerator * GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, - struct BenchmarkPartner *dest, - enum GeneratorType type, - long int base_value, - long int value_rate, - struct GNUNET_TIME_Relative period, - struct GNUNET_TIME_Relative frequency, - enum GNUNET_ATS_PreferenceKind kind) + struct BenchmarkPartner *dest, + enum GeneratorType type, + unsigned int base_value, + unsigned int value_rate, + struct GNUNET_TIME_Relative period, + struct GNUNET_TIME_Relative frequency, + enum GNUNET_ATS_PreferenceKind kind) { struct PreferenceGenerator *pg; @@ -174,31 +174,31 @@ GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, switch (type) { case GNUNET_ATS_TEST_TG_CONSTANT: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_value); + "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_value); break; case GNUNET_ATS_TEST_TG_LINEAR: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_value, value_rate); + "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_value, value_rate); break; case GNUNET_ATS_TEST_TG_SINUS: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_value, value_rate); + "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_value, value_rate); break; case GNUNET_ATS_TEST_TG_RANDOM: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_value, value_rate); + "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_value, value_rate); break; default: break; diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c index 5eb01bd55..f0bab7367 100644 --- a/src/ats-tests/ats-testing-traffic.c +++ b/src/ats-tests/ats-testing-traffic.c @@ -93,8 +93,9 @@ get_delay (struct TrafficGenerator *tg) delay.rel_value_us = GNUNET_TIME_UNIT_SECONDS.rel_value_us * TEST_MESSAGE_SIZE / cur_rate; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Current rate is %u, calculated delay is %u \n", - cur_rate, delay.rel_value_us); + "Current rate is %lld, calculated delay is %llu\n", + cur_rate, + (unsigned long long) delay.rel_value_us); return delay; } @@ -308,12 +309,12 @@ GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p) */ struct TrafficGenerator * GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, - struct BenchmarkPartner *dest, - enum GeneratorType type, - long int base_rate, - long int max_rate, - struct GNUNET_TIME_Relative period, - struct GNUNET_TIME_Relative duration) + struct BenchmarkPartner *dest, + enum GeneratorType type, + unsigned int base_rate, + unsigned int max_rate, + struct GNUNET_TIME_Relative period, + struct GNUNET_TIME_Relative duration) { struct TrafficGenerator *tg; @@ -337,31 +338,32 @@ GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, switch (type) { case GNUNET_ATS_TEST_TG_CONSTANT: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_rate); + "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_rate); break; case GNUNET_ATS_TEST_TG_LINEAR: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_rate, max_rate); + "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_rate, + max_rate); break; case GNUNET_ATS_TEST_TG_SINUS: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_rate, max_rate); + "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_rate, max_rate); break; case GNUNET_ATS_TEST_TG_RANDOM: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", - dest->me->no, GNUNET_i2s (&dest->me->id), - dest->dest->no, GNUNET_i2s (&dest->dest->id), - base_rate, max_rate); + "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", + dest->me->no, GNUNET_i2s (&dest->me->id), + dest->dest->no, GNUNET_i2s (&dest->dest->id), + base_rate, max_rate); break; default: break; diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index 49aa5a052..24d464424 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c @@ -243,8 +243,9 @@ comm_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) if (me->core_slave_connections == top->num_slaves) { - GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Master [%u] connected all slaves\n", - me->no); + GNUNET_log(GNUNET_ERROR_TYPE_INFO, + "Master [%u] connected all slaves\n", + me->no); } completed = GNUNET_YES; for (c = 0; c < top->num_masters; c++) @@ -254,9 +255,8 @@ comm_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) } if (GNUNET_YES == completed) { - GNUNET_log(GNUNET_ERROR_TYPE_INFO, - "All master peers connected all slave peers\n", id, - GNUNET_i2s (peer)); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "All master peers connected all slave peers\n"); top->state.connected_CORE = GNUNET_YES; /* Notify about setup done */ if (NULL != top->done_cb) diff --git a/src/ats-tests/ats-testing.h b/src/ats-tests/ats-testing.h index f0770d6ae..74da0f78c 100644 --- a/src/ats-tests/ats-testing.h +++ b/src/ats-tests/ats-testing.h @@ -591,12 +591,13 @@ GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p); */ struct TrafficGenerator * GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, - struct BenchmarkPartner *dest, - enum GeneratorType type, - long int base_rate, - long int max_rate, - struct GNUNET_TIME_Relative period, - struct GNUNET_TIME_Relative duration); + struct BenchmarkPartner *dest, + enum GeneratorType type, + unsigned int base_rate, + unsigned int max_rate, + struct GNUNET_TIME_Relative period, + struct GNUNET_TIME_Relative duration); + void GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg); @@ -623,13 +624,13 @@ GNUNET_ATS_TEST_generate_traffic_stop_all (); */ struct PreferenceGenerator * GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, - struct BenchmarkPartner *dest, - enum GeneratorType type, - long int base_value, - long int value_rate, - struct GNUNET_TIME_Relative period, - struct GNUNET_TIME_Relative frequency, - enum GNUNET_ATS_PreferenceKind kind); + struct BenchmarkPartner *dest, + enum GeneratorType type, + unsigned int base_value, + unsigned int value_rate, + struct GNUNET_TIME_Relative period, + struct GNUNET_TIME_Relative frequency, + enum GNUNET_ATS_PreferenceKind kind); void GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg); diff --git a/src/ats/gnunet-service-ats_plugins.c b/src/ats/gnunet-service-ats_plugins.c index a753d6a8c..c2388e28b 100644 --- a/src/ats/gnunet-service-ats_plugins.c +++ b/src/ats/gnunet-service-ats_plugins.c @@ -132,8 +132,7 @@ solver_info_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_STOP", - (GAS_STAT_SUCCESS == status) ? "SUCCESS" : "FAIL", - add_info); + (GAS_STAT_SUCCESS == status) ? "SUCCESS" : "FAIL"); return; case GAS_OP_SOLVE_SETUP_START: GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -306,7 +305,7 @@ parse_quota (const char *quota_str, direction, GNUNET_ATS_print_network_type (network), quota_str, - GNUNET_ATS_DefaultBandwidth); + (unsigned long long) GNUNET_ATS_DefaultBandwidth); ret = GNUNET_ATS_DefaultBandwidth; } else @@ -360,7 +359,7 @@ load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg, _("No %s-quota configured for network `%s', assigning default bandwidth %llu\n"), direction, GNUNET_ATS_print_network_type (type), - GNUNET_ATS_DefaultBandwidth); + (unsigned long long) GNUNET_ATS_DefaultBandwidth); ret = GNUNET_ATS_DefaultBandwidth; } GNUNET_free (entry); diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index d5b0688e6..960f4788c 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c @@ -1105,7 +1105,10 @@ process_get_peer (struct GNUNET_CADET_Handle *h, if (msize != esize) { GNUNET_break_op (0); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "m:%u, e: %u\n", msize, esize); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "m:%u, e: %u\n", + (unsigned int) msize, + (unsigned int) esize); h->info_cb.peer_cb (h->info_cls, NULL, 0, 0, 0, NULL); goto clean_cls; } @@ -1212,11 +1215,17 @@ process_get_tunnel (struct GNUNET_CADET_Handle *h, if (msize != esize) { GNUNET_break_op (0); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "m:%u, e: %u (%u ch, %u conn)\n", - msize, esize, ch_n, c_n); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u (%u ch, %u conn)\n", - sizeof (struct GNUNET_CADET_LocalInfoTunnel), - sizeof (CADET_ChannelNumber), sizeof (struct GNUNET_HashCode)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "m:%u, e: %u (%u ch, %u conn)\n", + (unsigned int) msize, + (unsigned int) esize, + ch_n, + c_n); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%u (%u ch, %u conn)\n", + (unsigned int) sizeof (struct GNUNET_CADET_LocalInfoTunnel), + (unsigned int) sizeof (CADET_ChannelNumber), + (unsigned int) sizeof (struct GNUNET_HashCode)); h->info_cb.tunnel_cb (h->info_cls, NULL, 0, 0, NULL, NULL, 0, 0); goto clean_cls; } diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c index b2a07cb0c..aa095d190 100644 --- a/src/cadet/gnunet-cadet-profiler.c +++ b/src/cadet/gnunet-cadet-profiler.c @@ -453,8 +453,10 @@ stats_iterator (void *cls, uint32_t i; i = GNUNET_TESTBED_get_index (peer); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " STATS %u - %s [%s]: %llu\n", - i, subsystem, name, value); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + " STATS %u - %s [%s]: %llu\n", + i, subsystem, name, + (unsigned long long) value); return GNUNET_OK; } @@ -569,7 +571,9 @@ adjust_running_peers (unsigned int target) static void next_rnd (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ROUND %ld\n", current_round); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "ROUND %u\n", + current_round); if (0.0 == rounds[current_round]) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Finishing\n"); @@ -680,7 +684,7 @@ pong (struct GNUNET_CADET_Channel *channel, static size_t tmt_rdy_ping (void *cls, size_t size, void *buf) { - struct CadetPeer *peer = (struct CadetPeer *) cls; + struct CadetPeer *peer = cls; struct CadetPingMessage *msg = buf; peer->ping_ntr = NULL; @@ -691,11 +695,16 @@ tmt_rdy_ping (void *cls, size_t size, void *buf) GNUNET_break (GNUNET_YES == test_finished); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "size %u, buf %p, data_sent %u, data_received %u\n", - size, buf, peer->data_sent, peer->data_received); + (unsigned int) size, + buf, + peer->data_sent, + peer->data_received); return 0; } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending: msg %d\n", peer->data_sent); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending: msg %d\n", + peer->data_sent); msg->header.size = htons (size); msg->header.type = htons (PING); msg->counter = htonl (peer->data_sent++); @@ -726,7 +735,9 @@ ping_handler (void *cls, struct GNUNET_CADET_Channel *channel, { long n = (long) cls; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u got PING\n", n); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%u got PING\n", + (unsigned int) n); GNUNET_CADET_receive_done (channel); if (GNUNET_NO == test_finished) pong (channel, (struct CadetPingMessage *) message); @@ -814,8 +825,11 @@ incoming_channel (void *cls, struct GNUNET_CADET_Channel *channel, GNUNET_assert (NULL != peer); if (NULL == peers[n].incoming) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "WARMUP %3u: %u <= %u\n", - peers_warmup, n, get_index (peer)); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "WARMUP %3u: %u <= %u\n", + peers_warmup, + (unsigned int) n, + get_index (peer)); peers_warmup++; if (peers_warmup < peers_total) return NULL; @@ -829,8 +843,11 @@ incoming_channel (void *cls, struct GNUNET_CADET_Channel *channel, } GNUNET_assert (peer == peers[n].incoming); GNUNET_assert (peer->dest == &peers[n]); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <= %u %p\n", - n, get_index (peer), channel); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "%u <= %u %p\n", + (unsigned int) n, + get_index (peer), + channel); peers[n].incoming_ch = channel; return NULL; @@ -911,8 +928,11 @@ start_test (void *cls) GNUNET_CADET_TEST_cleanup (test_ctx); return; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u => %u %p\n", - i, get_index (peers[i].dest), peers[i].ch); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "%lu => %u %p\n", + i, + get_index (peers[i].dest), + peers[i].ch); peers[i].ping_task = GNUNET_SCHEDULER_add_delayed (delay_ms_rnd (2000), &ping, &peers[i]); } @@ -981,8 +1001,10 @@ peer_id_cb (void *cls, return; } peers[n].id = *(pinfo->result.id); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, " %u id: %s\n", - n, GNUNET_i2s (&peers[n].id)); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "%ld id: %s\n", + n, + GNUNET_i2s (&peers[n].id)); GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n], GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 6453392d8..f24975203 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c @@ -266,7 +266,9 @@ data_ready (void *cls, size_t size, void *buf) } total_size = data_size + sizeof (struct GNUNET_MessageHeader); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending %u bytes\n", data_size); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "sending %u bytes\n", + (unsigned int) data_size); GNUNET_assert (size >= total_size); msg = buf; @@ -297,7 +299,9 @@ read_stdio (void *cls) static char buf[60000]; data_size = read (0, buf, 60000); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "stdio read %u bytes\n", data_size); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "stdio read %u bytes\n", + (unsigned int) data_size); if (data_size < 1) { GNUNET_SCHEDULER_shutdown(); diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c index 7b9589181..77529e3b5 100644 --- a/src/conversation/gnunet-helper-audio-playback.c +++ b/src/conversation/gnunet-helper-audio-playback.c @@ -173,15 +173,15 @@ process_header (ogg_packet *op) dec = opus_decoder_create (SAMPLING_RATE, channels, &err); if (OPUS_OK != err) { - fprintf (stderr, - "Cannot create encoder: %s\n", + fprintf (stderr, + "Cannot create encoder: %s\n", opus_strerror (err)); return NULL; } if (! dec) { fprintf (stderr, - "Decoder initialization failed: %s\n", + "Decoder initialization failed: %s\n", opus_strerror (err)); return NULL; } @@ -209,7 +209,7 @@ process_header (ogg_packet *op) #ifdef DEBUG_DUMP_DECODED_OGG -static size_t +static size_t fwrite_le32(opus_int32 i32, FILE *file) { unsigned char buf[4]; @@ -221,7 +221,7 @@ fwrite_le32(opus_int32 i32, FILE *file) } -static size_t +static size_t fwrite_le16(int i16, FILE *file) { unsigned char buf[2]; @@ -292,9 +292,11 @@ audio_write (int64_t maxout) int64_t wrote = 0; wrote = to_write; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Writing %u * %u * %u = %u bytes into PA\n", - to_write, channels, sizeof (float), - to_write * channels * sizeof (float)); + "Writing %u * %u * %u = %llu bytes into PA\n", + to_write, + channels, + (unsigned int) sizeof (float), + (unsigned long long) (to_write * channels * sizeof (float))); #ifdef DEBUG_DUMP_DECODED_OGG if (dump_to_stdout) { @@ -453,12 +455,14 @@ ogg_demux_and_decode () so that we can adjust the timestamp counting.*/ gran_offset = preskip; - if (!pcm_buffer) + if (! pcm_buffer) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Allocating %u * %u * %u = %u bytes of buffer space\n", - MAX_FRAME_SIZE, channels, sizeof (float), - MAX_FRAME_SIZE * channels * sizeof (float)); + "Allocating %u * %u * %u = %llu bytes of buffer space\n", + MAX_FRAME_SIZE, + channels, + (unsigned int) sizeof (float), + (unsigned long long) (MAX_FRAME_SIZE * channels * sizeof (float))); pcm_buffer = pa_xmalloc (sizeof (float) * MAX_FRAME_SIZE * channels); } } @@ -501,7 +505,9 @@ ogg_demux_and_decode () frame_size = ret; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decoded %d bytes/channel (%d bytes) from %u compressed bytes\n", - ret, ret * channels, op.bytes); + ret, + ret * channels, + (unsigned int) op.bytes); /*Apply header gain, if we're not using an opus library new enough to do this internally.*/ diff --git a/src/conversation/gnunet-helper-audio-record.c b/src/conversation/gnunet-helper-audio-record.c index 31943810f..73f4cfda3 100644 --- a/src/conversation/gnunet-helper-audio-record.c +++ b/src/conversation/gnunet-helper-audio-record.c @@ -405,8 +405,8 @@ stream_read_callback (pa_stream * s, const void *data; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Got %u/%u bytes of PCM data\n", - length, + "Got %u/%d bytes of PCM data\n", + (unsigned int) length, pcm_length); GNUNET_assert (NULL != s); @@ -718,8 +718,8 @@ ogg_init () if (NULL == commentspacket) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - _("Failed to allocate %d bytes for second packet\n"), - commentspacket_len); + _("Failed to allocate %u bytes for second packet\n"), + (unsigned int) commentspacket_len); exit (5); } diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 10f169105..d12fbdc56 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c @@ -779,7 +779,9 @@ transmit_line_audio (void *cls, ch->audio_data = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending %u bytes of audio data from line %u to remote line %u via cadet\n", - ch->audio_size, ch->line->local_line, ch->remote_line); + (unsigned int) ch->audio_size, + ch->line->local_line, + ch->remote_line); return sizeof (struct CadetAudioMessage) + ch->audio_size; } @@ -1291,21 +1293,25 @@ handle_cadet_audio_message (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %u bytes of AUDIO data for non-existing line %u, dropping.\n", - msize, ntohl (msg->remote_line)); + (unsigned int) msize, + ntohl (msg->remote_line)); return GNUNET_SYSERR; } if (NULL == ch) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %u bytes of AUDIO data for unknown sender.\n", - msize); + (unsigned int) msize); return GNUNET_SYSERR; } if ((GNUNET_YES == ch->suspended_local) || (GNUNET_YES == ch->suspended_remote)) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %u bytes of AUDIO data on suspended channel CID %u:(%u:%u); dropping\n", - msize, ch->cid, ch->remote_line, line->local_line); + (unsigned int) msize, + ch->cid, + ch->remote_line, + line->local_line); GNUNET_CADET_receive_done (channel); return GNUNET_OK; } @@ -1315,7 +1321,10 @@ handle_cadet_audio_message (void *cls, GNUNET_CADET_receive_done (channel); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Forwarding %u bytes of AUDIO data to client CID %u:(%u:%u)\n", - msize, ch->cid, ch->remote_line, ch->line->local_line); + (unsigned int) msize, + ch->cid, + ch->remote_line, + ch->line->local_line); cam = (struct ClientAudioMessage *) buf; cam->header.size = htons (sizeof (buf)); cam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 9bb5af100..6a1924e54 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c @@ -916,9 +916,9 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Ephemeral key message from peer `%s' rejected as its validity range does not match our system time (%llu not in [%llu,%llu]).\n"), GNUNET_i2s (&kx->peer), - now.abs_value_us, - start_t.abs_value_us, - end_t.abs_value_us); + (unsigned long long) now.abs_value_us, + (unsigned long long) start_t.abs_value_us, + (unsigned long long) end_t.abs_value_us); return; } kx->other_ephemeral_key = m->ephemeral_key; @@ -1395,7 +1395,7 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx, used - ENCRYPTED_HEADER_SIZE)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted %u bytes for %s\n", - used - ENCRYPTED_HEADER_SIZE, + (unsigned int) (used - ENCRYPTED_HEADER_SIZE), GNUNET_i2s (&kx->peer)); derive_auth_key (&auth_key, &kx->encrypt_key, @@ -1517,7 +1517,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, return; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decrypted %u bytes from %s\n", - size - ENCRYPTED_HEADER_SIZE, + (unsigned int) (size - ENCRYPTED_HEADER_SIZE), GNUNET_i2s (&kx->peer)); pt = (struct EncryptedMessage *) buf; diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index 890499394..0a547be1b 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c @@ -706,7 +706,7 @@ try_transmission (struct Session *session) "Soliciting messages (excess %d, maxpc %d, message size %u, deadline %s)\n", excess, maxpc, - msize, + (unsigned int) msize, GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_deadline), GNUNET_YES)); solicit_messages (session, diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index 6ebfba7fc..64c3640ad 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -1400,7 +1400,8 @@ process_stat_in (void *cls, payload += value; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Notification from statistics about existing payload (%llu), new payload is %llu\n", - value, payload); + (unsigned long long) value, + (unsigned long long) payload); return GNUNET_OK; } diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index a5757c25a..942bf5785 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c @@ -926,13 +926,18 @@ send_reply_to_client (void *cls, size_t size, void *buf) reply); memcpy (&cbuf[off], reply->msg, msize); GNUNET_free (reply); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n", - msize, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitting %u bytes to client %p\n", + (unsigned int) msize, + client->client_handle); off += msize; } process_pending_messages (client); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n", - (unsigned int) off, (unsigned int) size, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitted %u/%u bytes to client %p\n", + (unsigned int) off, + (unsigned int) size, + client->client_handle); return off; } diff --git a/src/dht/gnunet-service-wdht_clients.c b/src/dht/gnunet-service-wdht_clients.c index 8eb114660..3d2eba460 100644 --- a/src/dht/gnunet-service-wdht_clients.c +++ b/src/dht/gnunet-service-wdht_clients.c @@ -318,13 +318,18 @@ send_reply_to_client (void *cls, size_t size, void *buf) reply); memcpy (&cbuf[off], reply->msg, msize); GNUNET_free (reply); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n", - msize, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitting %u bytes to client %p\n", + (unsigned int) msize, + client->client_handle); off += msize; } process_pending_messages (client); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n", - (unsigned int) off, (unsigned int) size, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitted %u/%u bytes to client %p\n", + (unsigned int) off, + (unsigned int) size, + client->client_handle); return off; } diff --git a/src/dht/gnunet-service-xdht_clients.c b/src/dht/gnunet-service-xdht_clients.c index 3475d00c9..bc5504ebe 100644 --- a/src/dht/gnunet-service-xdht_clients.c +++ b/src/dht/gnunet-service-xdht_clients.c @@ -318,13 +318,18 @@ send_reply_to_client (void *cls, size_t size, void *buf) reply); memcpy (&cbuf[off], reply->msg, msize); GNUNET_free (reply); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n", - msize, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitting %u bytes to client %p\n", + (unsigned int) msize, + client->client_handle); off += msize; } process_pending_messages (client); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n", - (unsigned int) off, (unsigned int) size, client->client_handle); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transmitted %u/%u bytes to client %p\n", + (unsigned int) off, + (unsigned int) size, + client->client_handle); return off; } diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c index c6de94a5a..6f3137f8a 100644 --- a/src/dht/gnunet-service-xdht_neighbours.c +++ b/src/dht/gnunet-service-xdht_neighbours.c @@ -3309,8 +3309,10 @@ send_verify_successor_message (void *cls) trail_id = trail->trail_id; if (NULL == GDS_ROUTING_get_next_hop(trail_id,GDS_ROUTING_SRC_TO_DEST)) { - DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line", - GNUNET_i2s(&my_identity), GNUNET_h2s(&trail->trail_id), __LINE__); + DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u", + GNUNET_i2s (&my_identity), + GNUNET_h2s (&trail->trail_id), + __LINE__); GNUNET_break(0); return; } @@ -5352,8 +5354,10 @@ handle_dht_p2p_verify_successor_result(void *cls, { /* Here it may happen that source peer has found a new successor, and removed the trail, Hence no entry found in the routing table. Fail silently.*/ - DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line", - GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__); + DEBUG (" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u", + GNUNET_i2s (&my_identity), + GNUNET_h2s (&trail_id), + __LINE__); GNUNET_break_op(0); return GNUNET_OK; } @@ -5773,8 +5777,10 @@ handle_dht_p2p_trail_teardown (void *cls, const struct GNUNET_PeerIdentity *peer next_hop = GDS_ROUTING_get_next_hop (trail_id, trail_direction); if (NULL == next_hop) { - DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line", - GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__); + DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u", + GNUNET_i2s (&my_identity), + GNUNET_h2s(&trail_id), + __LINE__); GNUNET_break (0); return GNUNET_SYSERR; } diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index 03ea62152..065ea5d1b 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c @@ -494,8 +494,10 @@ bandwidth_stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) { - INFO ("# Outgoing bandwidth: %u\n", outgoing_bandwidth); - INFO ("# Incoming bandwidth: %u\n", incoming_bandwidth); + INFO ("# Outgoing bandwidth: %llu\n", + (unsigned long long) outgoing_bandwidth); + INFO ("# Incoming bandwidth: %llu\n", + (unsigned long long) incoming_bandwidth); GNUNET_SCHEDULER_shutdown (); } @@ -508,8 +510,8 @@ bandwidth_stats_cont (void *cls, * @param subsystem name of subsystem that created the statistic * @param name the name of the datum * @param value the current value - * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not - * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration + * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not + * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration */ static int bandwidth_stats_iterator (void *cls, @@ -635,7 +637,8 @@ get_iter (void *cls, total_put_path_length = total_put_path_length + (double)put_path_length; total_get_path_length = total_get_path_length + (double)get_path_length; - DEBUG ("total_put_path_length = %f,put_path \n",total_put_path_length); + DEBUG ("total_put_path_length = %u,put_path \n", + total_put_path_length); /* Summarize if profiling is complete */ if (n_active == n_gets_fail + n_gets_ok) { diff --git a/src/dns/dnsstub.c b/src/dns/dnsstub.c index c1e7b5f61..50a3320fb 100644 --- a/src/dns/dnsstub.c +++ b/src/dns/dnsstub.c @@ -436,7 +436,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Received DNS response that is too small (%u bytes)"), - r); + (unsigned int) r); return GNUNET_NO; } dns = (struct GNUNET_TUN_DnsHeader *) buf; diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index f31e11d83..7b9f7d5c9 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c @@ -1181,7 +1181,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp, char dbuf[INET6_ADDRSTRLEN]; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP packet with %u bytes going from %s:%u to %s:%u\n", - pktlen - sizeof (struct GNUNET_TUN_TcpHeader), + (unsigned int) (pktlen - sizeof (struct GNUNET_TUN_TcpHeader)), inet_ntop (af, source_ip, sbuf, sizeof (sbuf)), diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index e8b632a3f..42677af8a 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c @@ -2096,7 +2096,7 @@ create_download_context (struct GNUNET_FS_Handle *h, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting download %p, %u bytes at offset %llu\n", dc, - (unsigned long long) length, + (unsigned int) length, (unsigned long long) offset); dc->h = h; dc->uri = GNUNET_FS_uri_dup (uri); diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 07f4a5653..69876b8b5 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c @@ -204,7 +204,9 @@ write_update_information_graph (struct GNUNET_FS_UpdateInformationGraph *uig) if (NULL == wh) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - _("Failed to open `%s' for writing: %s\n"), STRERROR (errno)); + _("Failed to open `%s' for writing: %s\n"), + fn, + STRERROR (errno)); GNUNET_free (fn); return; } @@ -226,7 +228,9 @@ write_update_information_graph (struct GNUNET_FS_UpdateInformationGraph *uig) } END: if (GNUNET_OK != GNUNET_BIO_write_close (wh)) - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to write `%s': %s\n"), + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Failed to write `%s': %s\n"), + fn, STRERROR (errno)); GNUNET_free (fn); } diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 80843006e..530a7ac9b 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -508,8 +508,9 @@ block_proc (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Indexing block `%s' for offset %llu with index size %u\n", - GNUNET_h2s (&chk->query), (unsigned long long) offset, - sizeof (struct OnDemandBlock)); + GNUNET_h2s (&chk->query), + (unsigned long long) offset, + (unsigned int) sizeof (struct OnDemandBlock)); odb.offset = GNUNET_htonll (offset); odb.file_id = p->data.file.file_id; GNUNET_assert (pc->qre == NULL); diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index 2706aea30..e61442aa3 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c @@ -279,7 +279,7 @@ client_response_handler (void *cls, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Queued reply to query `%s' for local client\n", - GNUNET_h2s (&prd->query), (unsigned int) prd->type); + GNUNET_h2s (&prd->query)); if (GNUNET_BLOCK_EVALUATION_OK_LAST != eval) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index a76a3827c..d7a15fad6 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c @@ -296,7 +296,7 @@ transmit_content (struct MigrationReadyPeer *peer, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking for transmission of %u bytes to %s for migration\n", - msize, + (unsigned int) msize, GNUNET_i2s (GSF_connected_peer_get_identity2_(peer->peer))); peer->th = GSF_peer_transmit_ (peer->peer, GNUNET_NO, 0 /* priority */ , diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c index 284804175..21471350d 100644 --- a/src/gns/gnunet-bcd.c +++ b/src/gns/gnunet-bcd.c @@ -354,12 +354,12 @@ server_start () if ((0 == port) || (port > UINT16_MAX)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - _("Invalid port number %llu. Exiting.\n"), + _("Invalid port number %u. Exiting.\n"), port); return GNUNET_SYSERR; } GNUNET_log (GNUNET_ERROR_TYPE_INFO, - _("Businesscard HTTP server starts on %llu\n"), + _("Businesscard HTTP server starts on %u\n"), port); daemon_handle = MHD_start_daemon (MHD_USE_DUAL_STACK | MHD_USE_DEBUG, (uint16_t) port, diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c index 5b45af831..5c7b8887e 100644 --- a/src/hostlist/gnunet-daemon-hostlist_server.c +++ b/src/hostlist/gnunet-daemon-hostlist_server.c @@ -479,8 +479,8 @@ adv_transmit_ready (void *cls, (unsigned int) transmission_size); hostlist_adv_count++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - " # Sent advertisement message: %u\n", - hostlist_adv_count); + " # Sent advertisement message: %llu\n", + (unsigned long long) hostlist_adv_count); GNUNET_STATISTICS_update (stats, gettext_noop ("# hostlist advertisements send"), 1, GNUNET_NO); @@ -520,7 +520,7 @@ connect_handler (void *cls, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asked CORE to transmit advertisement message with a size of %u bytes to peer `%s'\n", - size, + (unsigned int) size, GNUNET_i2s (peer)); if (NULL == (th = GNUNET_CORE_notify_transmit_ready (core, GNUNET_YES, diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 855d151cd..1e42af95c 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -692,7 +692,7 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind); * a failure of the command 'cmd' with the message given * by strerror(errno). */ -#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0) +#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename, __FILE__, __LINE__, STRERROR(errno)); } while(0) /** diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c index 4611edc62..6d5b82cc9 100644 --- a/src/nat/nat_auto.c +++ b/src/nat/nat_auto.c @@ -522,7 +522,7 @@ test_stun (struct GNUNET_NAT_AutoHandle *ah) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "STUN service listens on port %u\n", - port); + (unsigned int) port); if (GNUNET_NO == GNUNET_NAT_stun_make_request (stun_server, stun_port, lsock4, diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index d4098d1bc..4d920465c 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -648,7 +648,7 @@ transmit_ready (void *cls, return 0; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "In round s, sending to `%s' estimate with %u bits\n", + "In round %s, sending to `%s' estimate with %u bits\n", GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].timestamp)), GNUNET_i2s (&peer_entry->id), (unsigned int) ntohl (size_estimate_messages[idx].matching_bits)); @@ -784,7 +784,7 @@ schedule_current_round (void *cls, delay = get_transmit_delay ((peer_entry->previous_round == GNUNET_NO) ? -1 : 0); peer_entry->transmit_task = - GNUNET_SCHEDULER_add_delayed (delay, + GNUNET_SCHEDULER_add_delayed (delay, &transmit_task_cb, peer_entry); return GNUNET_OK; diff --git a/src/peerstore/peerstore_common.c b/src/peerstore/peerstore_common.c index 617a0a8e0..5a008ca62 100644 --- a/src/peerstore/peerstore_common.c +++ b/src/peerstore/peerstore_common.c @@ -196,8 +196,9 @@ PEERSTORE_parse_record_message (const struct GNUNET_MessageHeader *message) if (req_size < sizeof (struct StoreRecordMessage)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Received message with invalid size: (%d < %d).\n", req_size, - sizeof (struct StoreRecordMessage)); + "Received message with invalid size: (%d < %d).\n", + (int) req_size, + (int) sizeof (struct StoreRecordMessage)); return NULL; } srm = (struct StoreRecordMessage *) message; @@ -209,8 +210,11 @@ PEERSTORE_parse_record_message (const struct GNUNET_MessageHeader *message) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received message with invalid sizes: (%d + %d + %d + %d != %d).\n", - ss_size, key_size, value_size, - sizeof (struct StoreRecordMessage), req_size); + ss_size, + key_size, + value_size, + (int) sizeof (struct StoreRecordMessage), + req_size); return NULL; } record = GNUNET_new (struct GNUNET_PEERSTORE_Record); diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 0f2216428..3edc0295c 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c @@ -1790,7 +1790,10 @@ client_recv_slave_join (void *cls, struct GNUNET_SERVER_Client *client, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%u + %u + %u != %u\n", - sizeof (*req), relay_size, join_msg_size, req_size); + (unsigned int) sizeof (*req), + relay_size, + join_msg_size, + req_size); GNUNET_break (0); GNUNET_SERVER_client_disconnect (client); GNUNET_free (slv); @@ -2261,7 +2264,9 @@ 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, size - sizeof (*msg)); + chn, + GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD, + (unsigned int) (size - sizeof (*msg))); GNUNET_break (0); transmit_cancel (chn, client); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); @@ -2298,13 +2303,18 @@ client_recv_psyc_message (void *cls, struct GNUNET_SERVER_Client *client, * Received result of GNUNET_PSYCSTORE_membership_store() */ static void -store_recv_membership_store_result (void *cls, int64_t result, - const char *err_msg, uint16_t err_msg_size) +store_recv_membership_store_result (void *cls, + int64_t result, + const char *err_msg, + uint16_t err_msg_size) { struct Operation *op = cls; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p GNUNET_PSYCSTORE_membership_store() returned %" PRId64 " (%.s)\n", - op->chn, result, err_msg_size, err_msg); + op->chn, + result, + (int) err_msg_size, + err_msg); if (NULL != op->client) client_send_result (op->client, op->op_id, result, err_msg, err_msg_size); @@ -2432,7 +2442,10 @@ client_recv_history_replay (void *cls, struct GNUNET_SERVER_Client *client, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%p History replay #%" PRIu64 ": " "invalid method prefix. size: %u < %u?\n", - chn, GNUNET_ntohll (req->op_id), size, sizeof (*req) + 1); + chn, + GNUNET_ntohll (req->op_id), + size, + (unsigned int) sizeof (*req) + 1); GNUNET_break (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; diff --git a/src/psycstore/gnunet-service-psycstore.c b/src/psycstore/gnunet-service-psycstore.c index e02f77714..801ea628d 100644 --- a/src/psycstore/gnunet-service-psycstore.c +++ b/src/psycstore/gnunet-service-psycstore.c @@ -383,7 +383,8 @@ handle_message_get (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Message get: invalid method prefix. size: %u < %u?\n", - size, sizeof (*req) + 1); + size, + (unsigned int) (sizeof (*req) + 1)); GNUNET_break (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; diff --git a/src/psycutil/psyc_message.c b/src/psycutil/psyc_message.c index e16a4e859..3dba05b3f 100644 --- a/src/psycutil/psyc_message.c +++ b/src/psycutil/psyc_message.c @@ -282,7 +282,10 @@ GNUNET_PSYC_log_message (enum GNUNET_ErrorType kind, { struct GNUNET_PSYC_MessageMethod *meth = (struct GNUNET_PSYC_MessageMethod *) msg; - GNUNET_log (kind, "\t%.*s\n", size - sizeof (*meth), &meth[1]); + GNUNET_log (kind, + "\t%.*s\n", + (int) (size - sizeof (*meth)), + &meth[1]); break; } case GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER: @@ -291,8 +294,12 @@ GNUNET_PSYC_log_message (enum GNUNET_ErrorType kind, = (struct GNUNET_PSYC_MessageModifier *) msg; uint16_t name_size = ntohs (mod->name_size); char oper = ' ' < mod->oper ? mod->oper : ' '; - GNUNET_log (kind, "\t%c%.*s\t%.*s\n", oper, name_size, &mod[1], - size - sizeof (*mod) - name_size, + GNUNET_log (kind, + "\t%c%.*s\t%.*s\n", + oper, + (int) name_size, + &mod[1], + (int) (size - sizeof (*mod) - name_size), ((char *) &mod[1]) + name_size); break; } diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index db5432845..f65681848 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c @@ -559,7 +559,10 @@ stats_iterator (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%p -> %s [%s]: %llu\n", - peer, subsystem, name, value); + peer, + subsystem, + name, + (unsigned long long) value); return GNUNET_OK; } size = @@ -569,7 +572,8 @@ stats_iterator (void *cls, peer, subsystem, value, name); if (size != GNUNET_DISK_file_write (data_file, output_buffer, size)) - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Unable to write to file!\n"); return GNUNET_OK; } diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c index 0ab1aad8f..cd7246957 100644 --- a/src/regex/regex_block_lib.c +++ b/src/regex/regex_block_lib.c @@ -164,7 +164,7 @@ struct CheckEdgeContext * @param len Lenght of token. * @param key Hash of next state. * - * @return GNUNET_YES, to keep iterating + * @return #GNUNET_YES, to keep iterating */ static int check_edge (void *cls, @@ -175,8 +175,11 @@ check_edge (void *cls, struct CheckEdgeContext *ctx = cls; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "edge %.*s [%u]: %s->%s\n", - (int) len, token, len, GNUNET_h2s(key)); + "edge %.*s [%u]: %sn", + (int) len, + token, + (unsigned int) len, + GNUNET_h2s (key)); if (NULL == ctx->xquery) return GNUNET_YES; if (strlen (ctx->xquery) < len) @@ -209,7 +212,8 @@ REGEX_BLOCK_check (const struct RegexBlock *block, struct CheckEdgeContext ctx; int res; - LOG (GNUNET_ERROR_TYPE_DEBUG, "Block check\n"); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Block check\n"); if (GNUNET_OK != REGEX_BLOCK_get_key (block, size, &key)) @@ -229,8 +233,9 @@ REGEX_BLOCK_check (const struct RegexBlock *block, ( (NULL == xquery) || ('\0' == xquery[0]) ) ) { LOG (GNUNET_ERROR_TYPE_DEBUG, - " out! Is accepting: %u, xquery %p\n", - ntohs(block->is_accepting), xquery); + " out! Is accepting: %u, xquery %p\n", + ntohs(block->is_accepting), + xquery); return GNUNET_OK; } ctx.xquery = xquery; diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 92d478442..fa17954b4 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c @@ -409,19 +409,6 @@ kill_httpd () } -/** - * Task run whenever HTTP server is idle for too long. Kill it. - * - * @param cls NULL - */ -static void -kill_httpd_task (void *cls) -{ - httpd_task = NULL; - kill_httpd (); -} - - /** * Schedule MHD. This function should be called initially when an * MHD is first getting its client socket, and will then automatically diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c index 3162d1252..4a1e9cbd0 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c @@ -1179,8 +1179,7 @@ handle_client_disconnect (void *cls, if (NULL == client) return; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Client disconnected from us.\n", - client); + "Client disconnected from us.\n"); s = GNUNET_SERVER_client_get_user_context (client, struct BobServiceSession); if (NULL == s) diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c index 8d97ea1b6..79a0e961a 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c @@ -1470,8 +1470,7 @@ handle_client_disconnect (void *cls, if (NULL == client) return; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Client disconnected from us.\n", - client); + "Client disconnected from us.\n"); s = GNUNET_SERVER_client_get_user_context (client, struct BobServiceSession); if (NULL == s) diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index 186a2763e..6d97f0bb1 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c @@ -192,7 +192,10 @@ set_result_cb (void *cls, if (element->size != sizeof (struct GNUNET_HashCode)) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "wrong element size: %u, expected %u\n", element->size, sizeof (struct GNUNET_HashCode)); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "wrong element size: %u, expected %u\n", + element->size, + (unsigned int) sizeof (struct GNUNET_HashCode)); GNUNET_assert (0); } diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index adec5a96d..8d989dafb 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c @@ -321,7 +321,7 @@ load (struct GNUNET_SERVER_Handle *server) } GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading %llu bytes of statistics from `%s'\n"), - fsize, fn); + (unsigned long long) fsize, fn); mst = GNUNET_SERVER_mst_create (&inject_message, server); GNUNET_break (GNUNET_OK == @@ -475,7 +475,7 @@ transmit (struct GNUNET_SERVER_Client *client, e->subsystem->service, e->name, e->persistent, - e->value); + (unsigned long long) e->value); GNUNET_SERVER_notification_context_unicast (nc, client, &m->header, GNUNET_NO); GNUNET_free (m); @@ -793,7 +793,7 @@ handle_set (void *cls, "Statistic `%s:%s' updated to value %llu (%d).\n", service, name, - pos->value, + (unsigned long long) pos->value, pos->persistent); if ( (changed) || (1 == initial_set) ) @@ -829,7 +829,7 @@ handle_set (void *cls, "New statistic on `%s:%s' with value %llu created.\n", service, name, - pos->value); + (unsigned long long) pos->value); GNUNET_SERVER_receive_done (client, GNUNET_OK); } @@ -907,7 +907,7 @@ handle_watch (void *cls, "New statistic on `%s:%s' with value %llu created.\n", service, name, - pos->value); + (unsigned long long) pos->value); } we = GNUNET_new (struct WatchEntry); we->client = client; diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index e27e21588..f3c56eb9d 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c @@ -513,7 +513,8 @@ read_task (void *cls) GNUNET_SCHEDULER_shutdown (); return; } - LOG_DEBUG ("Read %u bytes\n", sread); + LOG_DEBUG ("Read %u bytes\n", + (unsigned int) sread); if (GNUNET_OK != GNUNET_SERVER_mst_receive (tokenizer, NULL, buf, sread, GNUNET_NO, GNUNET_NO)) diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c index ba20d6d6b..9c12c25a6 100644 --- a/src/testbed/gnunet-service-testbed_peers.c +++ b/src/testbed/gnunet-service-testbed_peers.c @@ -429,14 +429,15 @@ GST_handle_peer_create (void *cls, struct GNUNET_SERVER_Client *client, /** - * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages + * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages * * @param cls NULL * @param client identification of the client * @param message the actual message */ void -GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client, +GST_handle_peer_destroy (void *cls, + struct GNUNET_SERVER_Client *client, const struct GNUNET_MessageHeader *message) { const struct GNUNET_TESTBED_PeerDestroyMessage *msg; @@ -446,8 +447,9 @@ GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client, msg = (const struct GNUNET_TESTBED_PeerDestroyMessage *) message; peer_id = ntohl (msg->peer_id); - LOG_DEBUG ("Received peer destory on peer: %u and operation id: %ul\n", - peer_id, GNUNET_ntohll (msg->operation_id)); + LOG_DEBUG ("Received peer destory on peer: %u and operation id: %llu\n", + (unsigned int) peer_id, + (unsigned long long) GNUNET_ntohll (msg->operation_id)); if (!VALID_PEER_ID (peer_id)) { LOG (GNUNET_ERROR_TYPE_ERROR, @@ -494,7 +496,7 @@ GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client, * Stats a peer * * @param peer the peer to start - * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure + * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ static int start_peer (struct Peer *peer) @@ -511,7 +513,7 @@ start_peer (struct Peer *peer) * Stops a peer * * @param peer the peer to stop - * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure + * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ static int stop_peer (struct Peer *peer) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 119e5e564..14eefdfb3 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -224,7 +224,7 @@ process_payload (const struct GNUNET_HELLO_Address *address, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Discarded %u bytes type %u payload from peer `%s'\n", - msg_size, + (unsigned int) msg_size, ntohs (message->type), GNUNET_i2s (&address->peer)); GNUNET_STATISTICS_update (GST_stats, gettext_noop @@ -866,9 +866,9 @@ run (void *cls, { max_fd_rlimit = r_file.rlim_cur; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Maximum number of open files was: %u/%u\n", - r_file.rlim_cur, - r_file.rlim_max); + "Maximum number of open files was: %u/%u\n", + (unsigned int) r_file.rlim_cur, + (unsigned int) r_file.rlim_max); } max_fd_rlimit = (9 * max_fd_rlimit) / 10; /* Keep 10% for rest of transport */ #endif diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index bd3fed6d7..7620cdbb1 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c @@ -350,7 +350,7 @@ GST_manipulation_send (const struct GNUNET_PeerIdentity *target, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Delaying %u byte message to peer `%s' with peer specific delay for %s\n", - msg_size, + (unsigned int) msg_size, GNUNET_i2s (target), GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 65428ef2a..9d1c9459e 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -1296,12 +1296,12 @@ transmit_send_continuation (void *cls, if (bytes_in_send_queue < mq->message_buf_size) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Bytes_in_send_queue `%u', Message_size %u, result: %s, payload %u, on wire %u\n", + "Bytes_in_send_queue `%llu', Message_size %u, result: %s, payload %u, on wire %u\n", bytes_in_send_queue, - mq->message_buf_size, + (unsigned int) mq->message_buf_size, (GNUNET_OK == success) ? "OK" : "FAIL", - size_payload, - physical); + (unsigned int) size_payload, + (unsigned int) physical); GNUNET_break (0); } @@ -1325,7 +1325,7 @@ transmit_send_continuation (void *cls, "Sending message to `%s' of type %u with %u bytes was a %s\n", GNUNET_i2s (receiver), ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type), - mq->message_buf_size, + (unsigned int) mq->message_buf_size, (success == GNUNET_OK) ? "success" : "FAILURE"); if (NULL != mq->cont) mq->cont (mq->cont_cls, @@ -1401,7 +1401,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Giving message with %u bytes to plugin session %p\n", - mq->message_buf_size, + (unsigned int) mq->message_buf_size, n->primary_address.session); (void) send_with_session (n, mq->message_buf, @@ -1773,7 +1773,7 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Enqueueing %u bytes to send to peer %s\n", - msg_size, + (unsigned int) msg_size, GNUNET_i2s (target)); GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, @@ -2117,7 +2117,7 @@ inbound_bw_tracker_update (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New inbound delay for peer `%s' is %llu ms\n", GNUNET_i2s (&n->id), - delay.rel_value_us / 1000); + (unsigned long long) delay.rel_value_us / 1000LL); papi->update_inbound_delay (papi->cls, &n->id, n->primary_address.session, @@ -3244,11 +3244,9 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, /* The session used to send the SYN terminated: * this implies a connect error*/ GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Failed to send SYN in %s with `%s' %p: session terminated\n", - "CONNECT_SENT", + "Failed to send SYN in CONNECT_SENT with `%s' %p: session terminated\n", GST_plugins_a2s (n->primary_address.address), - n->primary_address.session, - GNUNET_i2s (peer)); + n->primary_address.session); /* Destroy the address since it cannot be used */ unset_primary_address (n); @@ -3274,11 +3272,9 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, break; case GNUNET_TRANSPORT_PS_RECONNECT_SENT: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Failed to send SYN in %s with `%s' %p: session terminated\n", - "RECONNECT_SENT", + "Failed to send SYN in RECONNECT_SENT with `%s' %p: session terminated\n", GST_plugins_a2s (n->primary_address.address), - n->primary_address.session, - GNUNET_i2s (peer)); + n->primary_address.session); /* Destroy the address since it cannot be used */ unset_primary_address (n); set_state_and_timeout (n, diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index 2220790be..2b8b426c7 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c @@ -203,7 +203,7 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf client, GNUNET_i2s (&address->peer), address->transport_name, - address->address_length); + (unsigned int) address->address_length); msg = GNUNET_malloc (len); msg->header.size = htons (len); diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index 6fd871cbe..faf04cf27 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c @@ -51,7 +51,7 @@ static char *pwfn; /** * Write our current proof to disk. - * + * * @param cls closure */ static void @@ -65,7 +65,7 @@ shutdown_task (void *cls) GNUNET_DISK_PERM_USER_WRITE)) GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", - proof); + pwfn); } @@ -129,7 +129,7 @@ find_proof (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got Proof of Work %llu\n", - proof); + (unsigned long long) proof); proof_task = NULL; memcpy (&buf[sizeof (uint64_t)], &pub, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)); @@ -290,7 +290,7 @@ run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Delay between tries: %s\n", GNUNET_STRINGS_relative_time_to_string (proof_find_delay, 1)); - proof_task = + proof_task = GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, &find_proof, NULL); diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 2c3ac72fa..8741aa719 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c @@ -613,7 +613,7 @@ send_to_peer_notify_callback (void *cls, size_t size, void *buf) GNUNET_assert (size >= tnq->len); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending %u bytes via cadet channel\n", - tnq->len); + (unsigned int) tnq->len); GNUNET_CONTAINER_DLL_remove (ts->tmq_head, ts->tmq_tail, tnq); @@ -648,7 +648,7 @@ send_to_channel (struct ChannelMessageQueueEntry *tnq, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Queueing %u bytes for transmission via cadet channel\n", - tnq->len); + (unsigned int) tnq->len); GNUNET_assert (NULL != ts->channel); GNUNET_CONTAINER_DLL_insert_tail (ts->tmq_head, ts->tmq_tail,