[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: fix compiler warnin
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: fix compiler warnings, add assertions |
Date: |
Thu, 05 Sep 2019 11:11:40 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new b9dee3a1 fix compiler warnings, add assertions
b9dee3a1 is described below
commit b9dee3a1d54637a8c8d0e3ef34bd6b8bfd0d1bac
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Sep 5 11:11:00 2019 +0200
fix compiler warnings, add assertions
---
src/pq/pq_query_helper.c | 22 ++++++++++++++++++++++
src/util/crypto.c | 2 ++
2 files changed, 24 insertions(+)
diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c
index 31336b79..574245d5 100644
--- a/src/pq/pq_query_helper.c
+++ b/src/pq/pq_query_helper.c
@@ -54,6 +54,10 @@ qconv_amount_nbo (void *cls,
const struct TALER_AmountNBO *amount = data;
unsigned int off = 0;
+ (void) cls;
+ (void) scratch;
+ (void) scratch_length;
+ GNUNET_assert (sizeof (struct TALER_AmountNBO) == data_len);
GNUNET_assert (2 == param_length);
param_values[off] = (void *) &amount->value;
param_lengths[off] = sizeof (amount->value);
@@ -112,6 +116,11 @@ qconv_amount (void *cls,
const struct TALER_Amount *amount_hbo = data;
struct TALER_AmountNBO *amount;
+ (void) cls;
+ (void) scratch;
+ (void) scratch_length;
+ GNUNET_assert (2 == param_length);
+ GNUNET_assert (sizeof (struct TALER_AmountNBO) == data_len);
amount = GNUNET_new (struct TALER_AmountNBO);
scratch[0] = amount;
TALER_amount_hton (amount,
@@ -175,6 +184,10 @@ qconv_json (void *cls,
const json_t *json = data;
char *str;
+ (void) cls;
+ (void) data_len;
+ GNUNET_assert (1 == param_length);
+ GNUNET_assert (scratch_length > 0);
str = json_dumps (json, JSON_COMPACT);
if (NULL == str)
return -1;
@@ -230,6 +243,10 @@ qconv_round_time (void *cls,
struct GNUNET_TIME_Absolute tmp;
struct GNUNET_TIME_AbsoluteNBO *buf;
+ (void) cls;
+ GNUNET_assert (1 == param_length);
+ GNUNET_assert (sizeof (struct GNUNET_TIME_AbsoluteNBO) == data_len);
+ GNUNET_assert (scratch_length > 0);
GNUNET_break (NULL == cls);
if (1 != param_length)
return -1;
@@ -293,6 +310,11 @@ qconv_round_time_abs (void *cls,
const struct GNUNET_TIME_AbsoluteNBO *at = data;
struct GNUNET_TIME_Absolute tmp;
+ (void) cls;
+ (void) scratch;
+ (void) scratch_length;
+ GNUNET_assert (1 == param_length);
+ GNUNET_assert (sizeof (struct GNUNET_TIME_AbsoluteNBO) == data_len);
GNUNET_break (NULL == cls);
if (1 != param_length)
return -1;
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 4ddd86c1..b2139791 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -45,6 +45,8 @@ fatal_error_handler (void *cls,
int wtf,
const char *msg)
{
+ (void) cls;
+ (void) wtf;
fprintf (stderr,
"Fatal error in libgcrypt: %s\n",
msg);
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: fix compiler warnings, add assertions,
gnunet <=