gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit c698b4e1da9f397107c2cb087d6a6696a75aa5c1
parent c273f8675f375d31072955a22e09ec9b5fb1a97e
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Mon, 23 Oct 2023 21:55:24 +0200

BUILD: Silence warnings

Diffstat:
Msrc/lib/util/.gitignore | 3+++
Msrc/service/core/core_api_cmd_connecting_peers.c | 3+--
Msrc/service/core/test_core_plugin_cmd_just_run.c | 134-------------------------------------------------------------------------------
Msrc/service/datacache/test_datacache.c | 2+-
Msrc/service/datacache/test_datacache_quota.c | 2+-
Msrc/service/testing/testing_api_cmd_netjail_start_cmds_helper.c | 1+
Msrc/service/transport/transport_api_cmd_connecting_peers.c | 3+--
7 files changed, 8 insertions(+), 140 deletions(-)

diff --git a/src/lib/util/.gitignore b/src/lib/util/.gitignore @@ -75,3 +75,6 @@ perf_mq perf_scheduler test_crypto_cs test_crypto_ecc +test_child_management +test_scheduler_hogging_cancel +test_scheduler_hogging_priority diff --git a/src/service/core/core_api_cmd_connecting_peers.c b/src/service/core/core_api_cmd_connecting_peers.c @@ -135,12 +135,11 @@ connect_peers_run (void *cls, { char *prefix; char *rest; - char *rest2; char *address; prefix = strtok (addr, "_"); rest = strtok (NULL, "_"); - rest2 = strtok (rest, "-"); + strtok (rest, "-"); address = strtok (NULL, "-"); GNUNET_asprintf (&addr_and_port, diff --git a/src/service/core/test_core_plugin_cmd_just_run.c b/src/service/core/test_core_plugin_cmd_just_run.c @@ -56,8 +56,6 @@ static struct GNUNET_TESTING_Command start_peer; static struct GNUNET_TESTING_Interpreter *is; -static struct GNUNET_CONTAINER_MultiPeerMap *senders; - struct TestState { /** @@ -133,16 +131,6 @@ get_waiting_for_barriers () /** - * Callback to set the flag indicating all peers started. Will be called via the plugin api. - * - */ -static void -all_peers_started () -{ -} - - -/** * Function called with the final result of the test. * * @param cls the `struct MainParams` @@ -166,48 +154,6 @@ handle_result (void *cls, } -/** - * Callback from start peer cmd for signaling a peer got connected. - * - * -static void * -notify_connect (struct GNUNET_TESTING_Interpreter *is, - const struct GNUNET_PeerIdentity *peer) -{ - const struct ConnectPeersState *cps; - const struct GNUNET_TESTING_Command *cmd; - - cmd = GNUNET_TESTING_interpreter_lookup_command (is, - "connect-peers"); - GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, - &cps); - void *ret = NULL; - - cps->notify_connect (is, - peer); - return ret; - }*/ - - -/** - * Callback to set the flag indicating all peers are prepared to finish. Will be called via the plugin api. - */ -static void -all_local_tests_prepared () -{ - const struct GNUNET_TESTING_LocalPreparedState *lfs; - - GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, - &lfs); - GNUNET_assert (NULL != &lfs->ac); - if (NULL == lfs->ac.cont) - GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); - else - GNUNET_TESTING_async_finish ((struct - GNUNET_TESTING_AsyncContext *) &lfs->ac); -} - - static void child_completed_callback (void *cls, enum GNUNET_OS_ProcessStatusType type, @@ -218,82 +164,6 @@ child_completed_callback (void *cls, /** - * Function called to check a message being - * received. - * - */ -static int -check_encrypted (void *cls, struct GNUNET_MessageHeader *header) -{ - return GNUNET_OK; -} - - -static void -core_receive_continue (struct GNUNET_PeerIdentity *peer) -{ - const struct GNUNET_TESTING_StartPeerState *sps; - - GNUNET_TESTING_get_trait_state (&start_peer, - &sps); - - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Executing core receive continue\n"); - - GNUNET_TRANSPORT_core_receive_continue (sps->th, peer); -} - - -/*static void -handle_core (void *cls, struct GNUNET_MessageHeader *header) -{ - struct GNUNET_PeerIdentity *peer = cls; - - core_receive_continue (peer); - }*/ - - -/** - * Function called to handle a message being received. - * - */ -static void -handle_encrypted (void *cls, struct GNUNET_MessageHeader *header) -{ - struct GNUNET_PeerIdentity *peer = cls; - - core_receive_continue (peer); -} - - -static void -handle_ephemeral_key (void *cls, struct GNUNET_MessageHeader *header) -{ - struct GNUNET_PeerIdentity *peer = cls; - - core_receive_continue (peer); -} - - -static void -handle_ping (void *cls, struct GNUNET_MessageHeader *header) -{ - struct GNUNET_PeerIdentity *peer = cls; - - core_receive_continue (peer); -} - - -static void -handle_pong (void *cls, struct GNUNET_MessageHeader *header) -{ - struct GNUNET_PeerIdentity *peer = cls; - - core_receive_continue (peer); -} - - -/** * Function to start a local test case. * * @param write_message Callback to send a message to the master loop. @@ -393,15 +263,11 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb write_message, if (1 == m_int) { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "m_int %u should be 1\n"); GNUNET_asprintf (&ts->cfgname, "test_core_just_run_host.conf"); } else { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "m_int %u should not be 1\n"); GNUNET_asprintf (&ts->cfgname, "test_core_just_run.conf"); } diff --git a/src/service/datacache/test_datacache.c b/src/service/datacache/test_datacache.c @@ -36,7 +36,7 @@ static int ok; /** * Name of plugin under test. */ -static const char *plugin_name; +static char *plugin_name; static enum GNUNET_GenericReturnValue diff --git a/src/service/datacache/test_datacache_quota.c b/src/service/datacache/test_datacache_quota.c @@ -36,7 +36,7 @@ static int ok; /** * Name of plugin under test. */ -static const char *plugin_name; +static char *plugin_name; /** * Quota is 1 MB. Each iteration of the test puts in about 1 MB of diff --git a/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c b/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c @@ -679,6 +679,7 @@ start_helper (struct NetJailState *ns, plugin_name = topology->plugin; hkey = GNUNET_new (struct GNUNET_ShortHashCode); + node = NULL; if (0 == n) { GNUNET_CRYPTO_hash (&m, sizeof(m), &hc); diff --git a/src/service/transport/transport_api_cmd_connecting_peers.c b/src/service/transport/transport_api_cmd_connecting_peers.c @@ -135,12 +135,11 @@ connect_peers_run (void *cls, { char *prefix; char *rest; - char *rest2; char *address; prefix = strtok (addr, "_"); rest = strtok (NULL, "_"); - rest2 = strtok (rest, "-"); + strtok (rest, "-"); address = strtok (NULL, "-"); GNUNET_asprintf (&addr_and_port,