removing warnings

This commit is contained in:
Christian Grothoff 2020-03-27 14:05:59 +01:00
parent 69e50079b4
commit d923f29144
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
17 changed files with 44 additions and 12 deletions

View File

@ -52,6 +52,9 @@ TAH_MHD_handler_static_response (struct TAH_RequestHandler *rh,
{ {
size_t dlen; size_t dlen;
(void) connection_cls;
(void) upload_data;
(void) upload_data_size;
dlen = (0 == rh->data_size) dlen = (0 == rh->data_size)
? strlen ((const char *) rh->data) ? strlen ((const char *) rh->data)
: rh->data_size; : rh->data_size;

View File

@ -221,6 +221,7 @@ deposit_confirmation_run (void *cls,
const struct TALER_EXCHANGE_Keys *keys; const struct TALER_EXCHANGE_Keys *keys;
const struct TALER_EXCHANGE_SigningPublicKey *spk; const struct TALER_EXCHANGE_SigningPublicKey *spk;
(void) cmd;
dcs->is = is; dcs->is = is;
GNUNET_assert (NULL != dcs->deposit_reference); GNUNET_assert (NULL != dcs->deposit_reference);
deposit_cmd deposit_cmd
@ -385,6 +386,10 @@ deposit_confirmation_traits (void *cls,
const char *trait, const char *trait,
unsigned int index) unsigned int index)
{ {
(void) cls;
(void) ret;
(void) trait;
(void) index;
/* Must define this function because some callbacks /* Must define this function because some callbacks
* look for certain traits on _all_ the commands. */ * look for certain traits on _all_ the commands. */
return GNUNET_SYSERR; return GNUNET_SYSERR;

View File

@ -221,6 +221,7 @@ exchanges_run (void *cls,
{ {
struct ExchangesState *es = cls; struct ExchangesState *es = cls;
(void) cmd;
es->is = is; es->is = is;
es->leh = TALER_AUDITOR_list_exchanges es->leh = TALER_AUDITOR_list_exchanges
(is->auditor, (is->auditor,
@ -283,6 +284,10 @@ exchanges_traits (void *cls,
const char *trait, const char *trait,
unsigned int index) unsigned int index)
{ {
(void) cls;
(void) ret;
(void) trait;
(void) index;
/* Must define this function because some callbacks /* Must define this function because some callbacks
* look for certain traits on _all_ the commands. */ * look for certain traits on _all_ the commands. */
return GNUNET_SYSERR; return GNUNET_SYSERR;

View File

@ -61,6 +61,7 @@ auditor_run (void *cls,
{ {
struct AuditorState *ks = cls; struct AuditorState *ks = cls;
(void) cmd;
ks->auditor_proc ks->auditor_proc
= GNUNET_OS_start_process (GNUNET_NO, = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL, GNUNET_OS_INHERIT_STD_ALL,
@ -92,6 +93,7 @@ auditor_cleanup (void *cls,
{ {
struct AuditorState *ks = cls; struct AuditorState *ks = cls;
(void) cmd;
if (NULL != ks->auditor_proc) if (NULL != ks->auditor_proc)
{ {
GNUNET_break (0 == GNUNET_break (0 ==

View File

@ -61,6 +61,7 @@ auditor_dbinit_run (void *cls,
{ {
struct AuditorDbinitState *ks = cls; struct AuditorDbinitState *ks = cls;
(void) cmd;
ks->auditor_dbinit_proc ks->auditor_dbinit_proc
= GNUNET_OS_start_process (GNUNET_NO, = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL, GNUNET_OS_INHERIT_STD_ALL,
@ -93,6 +94,7 @@ auditor_dbinit_cleanup (void *cls,
{ {
struct AuditorDbinitState *ks = cls; struct AuditorDbinitState *ks = cls;
(void) cmd;
if (NULL != ks->auditor_dbinit_proc) if (NULL != ks->auditor_dbinit_proc)
{ {
GNUNET_break (0 == GNUNET_break (0 ==

View File

@ -195,6 +195,7 @@ confirmation_cb (void *cls,
struct AdminAddIncomingState *fts = cls; struct AdminAddIncomingState *fts = cls;
struct TALER_TESTING_Interpreter *is = fts->is; struct TALER_TESTING_Interpreter *is = fts->is;
(void) json;
fts->aih = NULL; fts->aih = NULL;
if (MHD_HTTP_OK != http_status) if (MHD_HTTP_OK != http_status)
{ {
@ -253,6 +254,7 @@ admin_add_incoming_run (void *cls,
{ {
struct AdminAddIncomingState *fts = cls; struct AdminAddIncomingState *fts = cls;
(void) cmd;
/* Use reserve public key as subject */ /* Use reserve public key as subject */
if (NULL != fts->reserve_reference) if (NULL != fts->reserve_reference)
{ {

View File

@ -83,6 +83,7 @@ check_bank_admin_transfer_run (void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub; const struct TALER_ReservePublicKeyP *reserve_pub;
const struct TALER_TESTING_Command *cmd_ref; const struct TALER_TESTING_Command *cmd_ref;
(void) cmd;
cmd_ref cmd_ref
= TALER_TESTING_interpreter_lookup_command (is, = TALER_TESTING_interpreter_lookup_command (is,
bcs->reserve_pub_ref); bcs->reserve_pub_ref);
@ -153,6 +154,7 @@ check_bank_admin_transfer_cleanup (void *cls,
{ {
struct BankAdminCheckState *bcs = cls; struct BankAdminCheckState *bcs = cls;
(void) cmd;
GNUNET_free (bcs); GNUNET_free (bcs);
} }

View File

@ -94,6 +94,7 @@ check_bank_transfer_run (void *cls,
const char *debit_payto; const char *debit_payto;
const char *credit_payto; const char *credit_payto;
(void) cmd;
if (NULL == bcs->deposit_reference) if (NULL == bcs->deposit_reference)
{ {
TALER_LOG_INFO ("Deposit reference NOT given\n"); TALER_LOG_INFO ("Deposit reference NOT given\n");
@ -194,6 +195,7 @@ check_bank_transfer_cleanup (void *cls,
{ {
struct BankCheckState *bcs = cls; struct BankCheckState *bcs = cls;
(void) cmd;
GNUNET_free (bcs); GNUNET_free (bcs);
} }

View File

@ -40,6 +40,8 @@ check_bank_empty_cleanup
(void *cls, (void *cls,
const struct TALER_TESTING_Command *cmd) const struct TALER_TESTING_Command *cmd)
{ {
(void) cls;
(void) cmd;
return; return;
} }
@ -56,6 +58,8 @@ check_bank_empty_run (void *cls,
const struct TALER_TESTING_Command *cmd, const struct TALER_TESTING_Command *cmd,
struct TALER_TESTING_Interpreter *is) struct TALER_TESTING_Interpreter *is)
{ {
(void) cls;
(void) cmd;
if (GNUNET_OK != TALER_FAKEBANK_check_empty (is->fakebank)) if (GNUNET_OK != TALER_FAKEBANK_check_empty (is->fakebank))
{ {
GNUNET_break (0); GNUNET_break (0);
@ -76,6 +80,10 @@ check_bank_empty_traits (void *cls,
const char *trait, const char *trait,
unsigned int index) unsigned int index)
{ {
(void) cls;
(void) ret;
(void) trait;
(void) index;
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }

View File

@ -335,7 +335,6 @@ build_history (struct TALER_TESTING_Interpreter *is,
* Check that the "/history/incoming" response matches the * Check that the "/history/incoming" response matches the
* CMD whose offset in the list of CMDs is @a off. * CMD whose offset in the list of CMDs is @a off.
* *
* @param is the interpreter state.
* @param h expected history (array) * @param h expected history (array)
* @param total length of @a h * @param total length of @a h
* @param off the offset (of the CMD list) where the command * @param off the offset (of the CMD list) where the command
@ -344,8 +343,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
* @return #GNUNET_OK if the transaction is what we expect. * @return #GNUNET_OK if the transaction is what we expect.
*/ */
static int static int
check_result (struct TALER_TESTING_Interpreter *is, check_result (struct History *h,
struct History *h,
unsigned int total, unsigned int total,
unsigned int off, unsigned int off,
const struct TALER_BANK_CreditDetails *details) const struct TALER_BANK_CreditDetails *details)
@ -455,8 +453,7 @@ history_cb (void *cls,
} }
/* check current element */ /* check current element */
if (GNUNET_OK != check_result (is, if (GNUNET_OK != check_result (hs->h,
hs->h,
hs->total, hs->total,
hs->results_obtained, hs->results_obtained,
details)) details))

View File

@ -343,7 +343,6 @@ build_history (struct TALER_TESTING_Interpreter *is,
* Check that the "/history/outgoing" response matches the * Check that the "/history/outgoing" response matches the
* CMD whose offset in the list of CMDs is @a off. * CMD whose offset in the list of CMDs is @a off.
* *
* @param is the interpreter state.
* @param h expected history * @param h expected history
* @param total number of entries in @a h * @param total number of entries in @a h
* @param off the offset (of the CMD list) where the command * @param off the offset (of the CMD list) where the command
@ -352,8 +351,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
* @return #GNUNET_OK if the transaction is what we expect. * @return #GNUNET_OK if the transaction is what we expect.
*/ */
static int static int
check_result (struct TALER_TESTING_Interpreter *is, check_result (struct History *h,
struct History *h,
uint64_t total, uint64_t total,
unsigned int off, unsigned int off,
const struct TALER_BANK_DebitDetails *details) const struct TALER_BANK_DebitDetails *details)
@ -457,8 +455,7 @@ history_cb (void *cls,
} }
/* check current element */ /* check current element */
if (GNUNET_OK != check_result (is, if (GNUNET_OK != check_result (hs->h,
hs->h,
hs->total, hs->total,
hs->results_obtained, hs->results_obtained,
details)) details))

View File

@ -238,6 +238,7 @@ transfer_run (void *cls,
void *buf; void *buf;
size_t buf_size; size_t buf_size;
(void) cmd;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Transfer of %s from %s to %s\n", "Transfer of %s from %s to %s\n",
TALER_amount2s (&fts->amount), TALER_amount2s (&fts->amount),

View File

@ -72,7 +72,7 @@ batch_run (void *cls,
} }
bs->batch[bs->batch_ip].start_time bs->batch[bs->batch_ip].start_time
= bs->batch[bs->batch_ip].last_req_time = bs->batch[bs->batch_ip].last_req_time
= GNUNET_TIME_absolute_get (); = GNUNET_TIME_absolute_get ();
bs->batch[bs->batch_ip].num_tries = 1; bs->batch[bs->batch_ip].num_tries = 1;
bs->batch[bs->batch_ip].run (bs->batch[bs->batch_ip].cls, bs->batch[bs->batch_ip].run (bs->batch[bs->batch_ip].cls,
&bs->batch[bs->batch_ip], &bs->batch[bs->batch_ip],
@ -93,6 +93,7 @@ batch_cleanup (void *cls,
{ {
struct BatchState *bs = cls; struct BatchState *bs = cls;
(void) cmd;
for (unsigned int i = 0; for (unsigned int i = 0;
NULL != bs->batch[i].label; NULL != bs->batch[i].label;
i++) i++)

View File

@ -186,6 +186,7 @@ check_keys_cleanup (void *cls,
{ {
struct CheckKeysState *cks = cls; struct CheckKeysState *cks = cls;
(void) cmd;
GNUNET_free (cks); GNUNET_free (cks);
} }

View File

@ -267,6 +267,7 @@ deposit_run (void *cls,
struct TALER_MerchantPublicKeyP merchant_pub; struct TALER_MerchantPublicKeyP merchant_pub;
struct GNUNET_HashCode h_contract_terms; struct GNUNET_HashCode h_contract_terms;
(void) cmd;
ds->is = is; ds->is = is;
GNUNET_assert (ds->coin_reference); GNUNET_assert (ds->coin_reference);
coin_cmd = TALER_TESTING_interpreter_lookup_command coin_cmd = TALER_TESTING_interpreter_lookup_command

View File

@ -60,6 +60,7 @@ aggregator_run (void *cls,
{ {
struct AggregatorState *as = cls; struct AggregatorState *as = cls;
(void) cmd;
as->aggregator_proc as->aggregator_proc
= GNUNET_OS_start_process (GNUNET_NO, = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL, GNUNET_OS_INHERIT_STD_ALL,
@ -92,6 +93,7 @@ aggregator_cleanup (void *cls,
{ {
struct AggregatorState *as = cls; struct AggregatorState *as = cls;
(void) cmd;
if (NULL != as->aggregator_proc) if (NULL != as->aggregator_proc)
{ {
GNUNET_break (0 == GNUNET_break (0 ==

View File

@ -274,7 +274,7 @@ interpreter_run (void *cls)
cmd->label); cmd->label);
cmd->start_time cmd->start_time
= cmd->last_req_time = cmd->last_req_time
= GNUNET_TIME_absolute_get (); = GNUNET_TIME_absolute_get ();
cmd->num_tries = 1; cmd->num_tries = 1;
cmd->run (cmd->cls, cmd->run (cmd->cls,
cmd, cmd,
@ -591,6 +591,7 @@ TALER_TESTING_cert_cb (void *cls,
struct MainContext *main_ctx = cls; struct MainContext *main_ctx = cls;
struct TALER_TESTING_Interpreter *is = main_ctx->is; struct TALER_TESTING_Interpreter *is = main_ctx->is;
(void) compat;
if (NULL == keys) if (NULL == keys)
{ {
if (GNUNET_NO == is->working) if (GNUNET_NO == is->working)