From c5f879125f1c842f679b2c8e95341f3c1d3aa184 Mon Sep 17 00:00:00 2001 From: Carlo von lynX Date: Wed, 3 Aug 2016 20:28:45 +0000 Subject: [PATCH] leaks & warns --- po/POTFILES.in | 5 ++--- src/psyc/test_psyc.c | 2 +- src/psycstore/test_psycstore.c | 2 +- src/social/gnunet-service-social.c | 1 + src/social/gnunet-social.c | 4 +++- src/social/test_social.c | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 1c2e5f40e..ba49eeec1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -64,6 +64,7 @@ src/conversation/gnunet-service-conversation.c src/conversation/microphone.c src/conversation/plugin_gnsrecord_conversation.c src/conversation/speaker.c +src/core/core_api_2.c src/core/core_api.c src/core/core_api_monitor_peers.c src/core/core_api_mq.c @@ -71,7 +72,6 @@ src/core/gnunet-core.c src/core/gnunet-service-core.c src/core/gnunet-service-core_clients.c src/core/gnunet-service-core_kx.c -src/core/gnunet-service-core_neighbours.c src/core/gnunet-service-core_sessions.c src/core/gnunet-service-core_typemap.c src/curl/curl.c @@ -405,9 +405,8 @@ src/transport/plugin_transport_unix.c src/transport/plugin_transport_wlan.c src/transport/transport_api_address_to_string.c src/transport/transport_api_blacklist.c -src/transport/transport_api.c src/transport/transport_api_core.c -src/transport/transport_api_get_hello.c +src/transport/transport_api_hello_get.c src/transport/transport_api_manipulation.c src/transport/transport_api_monitor_peers.c src/transport/transport_api_monitor_plugins.c diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index 329ad5b25..7d39d8031 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c @@ -621,7 +621,7 @@ tmit_notify_mod (void *cls, uint16_t *data_size, void *data, uint8_t *oper, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test #%d: Transmit notify modifier: %u bytes available, " "%u modifiers left to process.\n", - test, *data_size, GNUNET_PSYC_env_get_count (tmit->env)); + test, *data_size, (unsigned int) GNUNET_PSYC_env_get_count (tmit->env)); uint16_t name_size = 0; size_t value_size = 0; diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c index 6741858ee..37e6b657c 100644 --- a/src/psycstore/test_psycstore.c +++ b/src/psycstore/test_psycstore.c @@ -195,7 +195,7 @@ state_result (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, " variable %s differs\nReceived: %.*s\nExpected: %.*s\n", - name, value_size, (char*) value, val_size, (char*) val); + name, (int) value_size, (char*) value, (int) val_size, (char*) val); GNUNET_assert (0); return GNUNET_SYSERR; } diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index e499130d4..afcd59b5d 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c @@ -1004,6 +1004,7 @@ place_recv_save_data (void *cls, if (plc->file_offset != GNUNET_DISK_file_seek (fh, plc->file_offset, GNUNET_DISK_SEEK_SET)) { GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "seek", filename); + GNUNET_DISK_file_close (fh); GNUNET_free (filename); return; } diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 5aa74c81a..39ebff442 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c @@ -936,8 +936,10 @@ guest_reconnected (void *cls, int result, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, uint64_t max_message_id) { + char *place_pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (place_pub_key); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Guest reconnected to place %s.\n", GNUNET_CRYPTO_eddsa_public_key_to_string(place_pub_key)); + "Guest reconnected to place %s.\n", place_pub_str); + GNUNET_free (place_pub_str); if (op_guest_leave) { guest_leave (); diff --git a/src/social/test_social.c b/src/social/test_social.c index eb32a031f..406f5cb67 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c @@ -1085,7 +1085,7 @@ host_answer_door (void *cls, (uint8_t) test, join_req_count); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s\n%.*s\n", - method_name, data_size, (const char *) data); + method_name, (int) data_size, (const char *) data); switch (test) { -- 2.25.1