fix warnings

This commit is contained in:
Christian Grothoff 2019-09-05 11:23:24 +02:00
parent b9dee3a1d5
commit 5fa4a0e7e1
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 26 additions and 1 deletions

View File

@ -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);

View File

@ -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 !=

View File

@ -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)

View File

@ -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))