diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-19 10:57:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-19 10:57:27 +0100 |
commit | bdaaa0f6cb8f99168ed9916064a5e4145426480c (patch) | |
tree | bd8e37886cbc6356a00d5a0592d99f30f0b2f3c9 /src/testing | |
parent | dff5510dd36059a567d1110da870cc79bd508f70 (diff) |
-fix misc. compiler warnings
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_auditor_add.c | 23 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_auditor_del.c | 23 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_change_auth.c | 28 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_exec_transfer.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_exec_wirewatch.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_insert_deposit.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_oauth.c | 11 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_rewind.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_set_wire_fee.c | 23 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_status.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_wire_add.c | 23 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_wire_del.c | 23 |
12 files changed, 26 insertions, 138 deletions
diff --git a/src/testing/testing_api_cmd_auditor_add.c b/src/testing/testing_api_cmd_auditor_add.c index 2c59f4194..e40e13194 100644 --- a/src/testing/testing_api_cmd_auditor_add.c +++ b/src/testing/testing_api_cmd_auditor_add.c @@ -168,26 +168,6 @@ auditor_add_cleanup (void *cls, } -/** - * Offer internal data from a "auditor_add" CMD, to other commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the object to offer. - * - * @return #GNUNET_OK on success. - */ -static int -auditor_add_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - return GNUNET_NO; -} - - struct TALER_TESTING_Command TALER_TESTING_cmd_auditor_add (const char *label, unsigned int expected_http_status, @@ -203,8 +183,7 @@ TALER_TESTING_cmd_auditor_add (const char *label, .cls = ds, .label = label, .run = &auditor_add_run, - .cleanup = &auditor_add_cleanup, - .traits = &auditor_add_traits + .cleanup = &auditor_add_cleanup }; return cmd; diff --git a/src/testing/testing_api_cmd_auditor_del.c b/src/testing/testing_api_cmd_auditor_del.c index 71525a10e..dc31b72b6 100644 --- a/src/testing/testing_api_cmd_auditor_del.c +++ b/src/testing/testing_api_cmd_auditor_del.c @@ -165,26 +165,6 @@ auditor_del_cleanup (void *cls, } -/** - * Offer internal data from a "auditor_del" CMD, to other commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the object to offer. - * - * @return #GNUNET_OK on success. - */ -static int -auditor_del_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - return GNUNET_NO; -} - - struct TALER_TESTING_Command TALER_TESTING_cmd_auditor_del (const char *label, unsigned int expected_http_status, @@ -200,8 +180,7 @@ TALER_TESTING_cmd_auditor_del (const char *label, .cls = ds, .label = label, .run = &auditor_del_run, - .cleanup = &auditor_del_cleanup, - .traits = &auditor_del_traits + .cleanup = &auditor_del_cleanup }; return cmd; diff --git a/src/testing/testing_api_cmd_change_auth.c b/src/testing/testing_api_cmd_change_auth.c index fdf5d3591..2f0f95b79 100644 --- a/src/testing/testing_api_cmd_change_auth.c +++ b/src/testing/testing_api_cmd_change_auth.c @@ -41,30 +41,6 @@ struct AuthchangeState /** - * No traits to offer, just provide a stub to be called when - * some CMDs iterates through the list of all the commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the trait to return. - * @return #GNUNET_OK on success. - */ -static int -authchange_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - (void) cls; - (void) ret; - (void) trait; - (void) index; - return GNUNET_NO; -} - - -/** * Run the command. * * @param cls closure. @@ -78,6 +54,7 @@ authchange_run (void *cls, { struct AuthchangeState *ss = cls; + (void) cmd; if (NULL != is->ctx) { GNUNET_CURL_fini (is->ctx); @@ -142,8 +119,7 @@ TALER_TESTING_cmd_set_authorization (const char *label, .cls = ss, .label = label, .run = &authchange_run, - .cleanup = &authchange_cleanup, - .traits = &authchange_traits + .cleanup = &authchange_cleanup }; return cmd; diff --git a/src/testing/testing_api_cmd_exec_transfer.c b/src/testing/testing_api_cmd_exec_transfer.c index beceec574..f8af443bd 100644 --- a/src/testing/testing_api_cmd_exec_transfer.c +++ b/src/testing/testing_api_cmd_exec_transfer.c @@ -60,6 +60,7 @@ transfer_run (void *cls, { struct TransferState *as = cls; + (void) cmd; as->transfer_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, @@ -94,6 +95,7 @@ transfer_cleanup (void *cls, { struct TransferState *as = cls; + (void) cmd; if (NULL != as->transfer_proc) { GNUNET_break (0 == diff --git a/src/testing/testing_api_cmd_exec_wirewatch.c b/src/testing/testing_api_cmd_exec_wirewatch.c index e4188ac8a..cd31688d5 100644 --- a/src/testing/testing_api_cmd_exec_wirewatch.c +++ b/src/testing/testing_api_cmd_exec_wirewatch.c @@ -61,6 +61,7 @@ wirewatch_run (void *cls, { struct WirewatchState *ws = cls; + (void) cmd; ws->wirewatch_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, @@ -94,6 +95,7 @@ wirewatch_cleanup (void *cls, { struct WirewatchState *ws = cls; + (void) cmd; if (NULL != ws->wirewatch_proc) { GNUNET_break (0 == diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c index 6b5d9d749..0001da223 100644 --- a/src/testing/testing_api_cmd_insert_deposit.c +++ b/src/testing/testing_api_cmd_insert_deposit.c @@ -139,6 +139,7 @@ insert_deposit_run (void *cls, struct TALER_DenominationPublicKey dpk; struct TALER_DenominationPrivateKey denom_priv; + (void) cmd; // prepare and store issue first. fake_issue (&issue); GNUNET_assert (GNUNET_OK == @@ -283,6 +284,7 @@ insert_deposit_cleanup (void *cls, { struct InsertDepositState *ids = cls; + (void) cmd; GNUNET_free (ids); } diff --git a/src/testing/testing_api_cmd_oauth.c b/src/testing/testing_api_cmd_oauth.c index 64cb6c031..9c2fef8e4 100644 --- a/src/testing/testing_api_cmd_oauth.c +++ b/src/testing/testing_api_cmd_oauth.c @@ -92,6 +92,11 @@ handle_post (void *cls, { struct RequestCtx *rc = cls; + (void) kind; + (void) filename; + (void) content_type; + (void) transfer_encoding; + (void) off; if (0 == strcmp (key, "code")) append (&rc->code, @@ -169,6 +174,8 @@ handler_cb (void *cls, unsigned int hc; json_t *body; + (void) cls; + (void) version; if (0 == strcasecmp (method, MHD_HTTP_METHOD_GET)) { @@ -292,6 +299,9 @@ cleanup (void *cls, { struct RequestCtx *rc = *con_cls; + (void) cls; + (void) connection; + (void) toe; if (NULL == rc) return; GNUNET_free (rc->code); @@ -340,6 +350,7 @@ oauth_cleanup (void *cls, { struct OAuthState *oas = cls; + (void) cmd; if (NULL != oas->mhd) { MHD_stop_daemon (oas->mhd); diff --git a/src/testing/testing_api_cmd_rewind.c b/src/testing/testing_api_cmd_rewind.c index dae456248..93b38d3c3 100644 --- a/src/testing/testing_api_cmd_rewind.c +++ b/src/testing/testing_api_cmd_rewind.c @@ -163,7 +163,7 @@ rewind_ip_run (void *cls, break; } } - if (new_ip > is->ip) + if (new_ip > (unsigned int) is->ip) { /* refuse to jump forward */ GNUNET_break (0); diff --git a/src/testing/testing_api_cmd_set_wire_fee.c b/src/testing/testing_api_cmd_set_wire_fee.c index 613e0f713..9b5f6258d 100644 --- a/src/testing/testing_api_cmd_set_wire_fee.c +++ b/src/testing/testing_api_cmd_set_wire_fee.c @@ -206,26 +206,6 @@ wire_add_cleanup (void *cls, } -/** - * Offer internal data from a "wire_add" CMD, to other commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the object to offer. - * - * @return #GNUNET_OK on success. - */ -static int -wire_add_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - return GNUNET_NO; -} - - struct TALER_TESTING_Command TALER_TESTING_cmd_set_wire_fee (const char *label, const char *wire_method, @@ -247,8 +227,7 @@ TALER_TESTING_cmd_set_wire_fee (const char *label, .cls = ds, .label = label, .run = &wire_add_run, - .cleanup = &wire_add_cleanup, - .traits = &wire_add_traits + .cleanup = &wire_add_cleanup }; return cmd; diff --git a/src/testing/testing_api_cmd_status.c b/src/testing/testing_api_cmd_status.c index 8fdfa461c..1424eb6a5 100644 --- a/src/testing/testing_api_cmd_status.c +++ b/src/testing/testing_api_cmd_status.c @@ -281,7 +281,7 @@ reserve_status_cb (void *cls, memset (found, 0, sizeof (found)); - for (unsigned int i = 0; i<=is->ip; i++) + for (unsigned int i = 0; i<= (unsigned int) is->ip; i++) { struct TALER_TESTING_Command *cmd = &is->commands[i]; diff --git a/src/testing/testing_api_cmd_wire_add.c b/src/testing/testing_api_cmd_wire_add.c index 8d8a3a4f6..f36eaa85b 100644 --- a/src/testing/testing_api_cmd_wire_add.c +++ b/src/testing/testing_api_cmd_wire_add.c @@ -178,26 +178,6 @@ wire_add_cleanup (void *cls, } -/** - * Offer internal data from a "wire_add" CMD, to other commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the object to offer. - * - * @return #GNUNET_OK on success. - */ -static int -wire_add_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - return GNUNET_NO; -} - - struct TALER_TESTING_Command TALER_TESTING_cmd_wire_add (const char *label, const char *payto_uri, @@ -215,8 +195,7 @@ TALER_TESTING_cmd_wire_add (const char *label, .cls = ds, .label = label, .run = &wire_add_run, - .cleanup = &wire_add_cleanup, - .traits = &wire_add_traits + .cleanup = &wire_add_cleanup }; return cmd; diff --git a/src/testing/testing_api_cmd_wire_del.c b/src/testing/testing_api_cmd_wire_del.c index 2a1c9e455..fa8c9bcd2 100644 --- a/src/testing/testing_api_cmd_wire_del.c +++ b/src/testing/testing_api_cmd_wire_del.c @@ -170,26 +170,6 @@ wire_del_cleanup (void *cls, } -/** - * Offer internal data from a "wire_del" CMD, to other commands. - * - * @param cls closure. - * @param[out] ret result. - * @param trait name of the trait. - * @param index index number of the object to offer. - * - * @return #GNUNET_OK on success. - */ -static int -wire_del_traits (void *cls, - const void **ret, - const char *trait, - unsigned int index) -{ - return GNUNET_NO; -} - - struct TALER_TESTING_Command TALER_TESTING_cmd_wire_del (const char *label, const char *payto_uri, @@ -207,8 +187,7 @@ TALER_TESTING_cmd_wire_del (const char *label, .cls = ds, .label = label, .run = &wire_del_run, - .cleanup = &wire_del_cleanup, - .traits = &wire_del_traits + .cleanup = &wire_del_cleanup }; return cmd; |