summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bank-lib/taler-bank-transfer.c7
-rw-r--r--src/json/json_helper.c4
-rw-r--r--src/pq/pq_result_helper.c15
-rw-r--r--src/util/util.c1
4 files changed, 26 insertions, 1 deletions
diff --git a/src/bank-lib/taler-bank-transfer.c b/src/bank-lib/taler-bank-transfer.c
index 6297d650..1d6e2e9e 100644
--- 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
index b915faba..9e601ccd 100644
--- 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
index 97710c43..f6eab87e 100644
--- 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
index e4697fab..45049f6f 100644
--- 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))