exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 5fa4a0e7e1c40bb07e28edc98ca2072ae7fcfacf
parent b9dee3a1d54637a8c8d0e3ef34bd6b8bfd0d1bac
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  5 Sep 2019 11:23:24 +0200

fix warnings

Diffstat:
Msrc/bank-lib/taler-bank-transfer.c | 7+++++++
Msrc/json/json_helper.c | 4+++-
Msrc/pq/pq_result_helper.c | 15+++++++++++++++
Msrc/util/util.c | 1+
4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/src/bank-lib/taler-bank-transfer.c b/src/bank-lib/taler-bank-transfer.c @@ -89,6 +89,7 @@ static struct GNUNET_CURL_RescheduleContext *rc; static void do_shutdown (void *cls) { + (void) cls; if (NULL != op) { TALER_BANK_admin_add_incoming_cancel (op); @@ -126,6 +127,8 @@ res_cb (void *cls, struct GNUNET_TIME_Absolute timestamp, const json_t *json) { + (void) cls; + (void) timestamp; op = NULL; switch (ec) { @@ -166,6 +169,10 @@ run (void *cls, { struct TALER_BANK_AuthenticationData auth; + (void) cls; + (void) args; + (void) cfgfile; + (void) cfg; ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, &rc); GNUNET_assert (NULL != ctx); diff --git a/src/json/json_helper.c b/src/json/json_helper.c @@ -83,6 +83,7 @@ parse_amount (void *cls, json_int_t fraction; const char *currency; + (void) cls; if (json_is_string (root)) { if (GNUNET_OK != @@ -122,7 +123,7 @@ parse_amount (void *cls, } if ( (value < 0) || (fraction < 0) || - (value > UINT64_MAX) || + (((uint64_t) value) > UINT64_MAX) || (fraction > UINT32_MAX) ) { GNUNET_break_op (0); @@ -183,6 +184,7 @@ parse_amount_nbo (void *cls, json_int_t fraction; const char *currency; + (void) cls; if (json_is_string (root)) { if (GNUNET_OK != diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c @@ -134,6 +134,11 @@ extract_amount_nbo (void *cls, char *frac_name; int ret; + if (sizeof (struct TALER_AmountNBO) != *dst_size) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } GNUNET_asprintf (&val_name, "%s_val", fname); @@ -205,6 +210,11 @@ extract_amount (void *cls, struct TALER_AmountNBO amount_nbo; int ret; + if (sizeof (struct TALER_AmountNBO) != *dst_size) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } GNUNET_asprintf (&val_name, "%s_val", fname); @@ -278,6 +288,8 @@ extract_json (void *cls, json_error_t json_error; size_t slen; + (void) cls; + (void) dst_size; fnum = PQfnumber (result, fname); if (fnum < 0) @@ -327,6 +339,7 @@ clean_json (void *cls, { json_t **dst = rd; + (void) cls; if (NULL != *dst) { json_decref (*dst); @@ -383,6 +396,7 @@ extract_round_time (void *cls, struct GNUNET_TIME_Absolute tmp; int fnum; + (void) cls; fnum = PQfnumber (result, fname); if (fnum < 0) @@ -465,6 +479,7 @@ extract_round_time_nbo (void *cls, struct GNUNET_TIME_Absolute tmp; int fnum; + (void) cls; fnum = PQfnumber (result, fname); if (fnum < 0) diff --git a/src/util/util.c b/src/util/util.c @@ -115,6 +115,7 @@ set_amount (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { struct TALER_Amount *amount = scls; + (void) ctx; if (GNUNET_OK != TALER_string_to_amount (value, amount))