summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-29 18:04:04 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-29 20:57:18 +0100
commit2696688aa31bd058ebff6610660d7e6d607c6e50 (patch)
tree41c0b34d966fe0768abc92007e6b5205a0644bc2 /src
parent36efe024f55c3373344170f077b984f678aa4269 (diff)
downloadexchange-2696688aa31bd058ebff6610660d7e6d607c6e50.tar.gz
exchange-2696688aa31bd058ebff6610660d7e6d607c6e50.tar.bz2
exchange-2696688aa31bd058ebff6610660d7e6d607c6e50.zip
fix compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/bank-lib/fakebank.c25
-rw-r--r--src/bank-lib/fakebank_history.c1
-rw-r--r--src/bank-lib/taler-fakebank-run.c7
-rw-r--r--src/bank-lib/testing_api_cmd_history.c137
-rw-r--r--src/bank-lib/testing_api_cmd_reject.c57
-rw-r--r--src/exchange/taler-exchange-aggregator.c30
-rw-r--r--src/exchange/taler-exchange-httpd.c19
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.c14
-rw-r--r--src/exchangedb/exchangedb_auditorkeys.c10
-rw-r--r--src/exchangedb/exchangedb_denomkeys.c6
-rw-r--r--src/exchangedb/plugin_exchangedb_common.c2
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c44
-rw-r--r--src/include/taler_testing_bank_lib.h7
-rw-r--r--src/wire-plugins/plugin_wire_ebics.c33
-rw-r--r--src/wire-plugins/plugin_wire_template.c37
15 files changed, 289 insertions, 140 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 4323afdc..94e2e8d7 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -367,7 +367,9 @@ handle_mhd_completion_callback (void *cls,
enum MHD_RequestTerminationCode toe)
{
/* struct TALER_FAKEBANK_Handle *h = cls; */
-
+ (void) cls;
+ (void) connection;
+ (void) toe;
GNUNET_JSON_post_parser_cleanup (*con_cls);
*con_cls = NULL;
}
@@ -607,6 +609,8 @@ handle_home_page (struct TALER_FAKEBANK_Handle *h,
struct MHD_Response *resp;
#define HELLOMSG "Hello, Fakebank!"
+ (void) h;
+ (void) con_cls;
resp = MHD_create_response_from_buffer
(strlen (HELLOMSG),
HELLOMSG,
@@ -640,8 +644,10 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
const char *delta;
struct Transaction *pos;
- if (GNUNET_OK != TFH_parse_history_common_args (connection,
- &ha))
+ (void) con_cls;
+ if (GNUNET_OK !=
+ TFH_parse_history_common_args (connection,
+ &ha))
{
GNUNET_break (0);
return MHD_NO;
@@ -666,9 +672,10 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
ha.range = &hri;
if (NULL == start)
+ {
pos = 0 > hri.count ?
h->transactions_tail : h->transactions_head;
-
+ }
else if (NULL != h->transactions_head)
{
for (pos = h->transactions_head;
@@ -727,8 +734,10 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
long long unsigned int end_stamp;
struct Transaction *pos;
- if (GNUNET_OK != TFH_parse_history_common_args (connection,
- &ha))
+ (void) con_cls;
+ if (GNUNET_OK !=
+ TFH_parse_history_common_args (connection,
+ &ha))
{
GNUNET_break (0);
return MHD_NO;
@@ -771,6 +780,7 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
&TFH_handle_history_range_advance);
}
+
/**
* Handle incoming HTTP request.
*
@@ -796,11 +806,10 @@ handle_mhd_request (void *cls,
{
struct TALER_FAKEBANK_Handle *h = cls;
+ (void) version;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Fakebank, serving: %s\n",
url);
-
-
if ( (0 == strcasecmp (url,
"/")) &&
(0 == strcasecmp (method,
diff --git a/src/bank-lib/fakebank_history.c b/src/bank-lib/fakebank_history.c
index b1770bb8..2ad363b4 100644
--- a/src/bank-lib/fakebank_history.c
+++ b/src/bank-lib/fakebank_history.c
@@ -130,6 +130,7 @@ struct Transaction *
TFH_handle_history_range_skip (const struct HistoryArgs *ha,
const struct Transaction *pos)
{
+ (void) ha;
/* Transactions
* are stored from "head"/older to "tail"/younger. */
return pos->next;
diff --git a/src/bank-lib/taler-fakebank-run.c b/src/bank-lib/taler-fakebank-run.c
index 51d054bc..2ed21d52 100644
--- a/src/bank-lib/taler-fakebank-run.c
+++ b/src/bank-lib/taler-fakebank-run.c
@@ -43,11 +43,13 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
-
+ (void) cls;
+ (void) args;
+ (void) cfgfile;
+ (void) cfg;
if (NULL == TALER_FAKEBANK_start (8082))
ret = 1;
ret = 0;
-
}
@@ -74,6 +76,5 @@ main (int argc,
&run,
NULL))
return 1;
-
return ret;
}
diff --git a/src/bank-lib/testing_api_cmd_history.c b/src/bank-lib/testing_api_cmd_history.c
index e69cd7c1..ca861314 100644
--- a/src/bank-lib/testing_api_cmd_history.c
+++ b/src/bank-lib/testing_api_cmd_history.c
@@ -64,9 +64,9 @@ struct HistoryState
/**
* How many rows we want in the result, _at most_. In
* the case of /history-range, we fake this value with
- * INT64_MAX.
+ * UINT64_MAX.
*/
- long long num_results;
+ unsigned long long num_results;
/**
* Handle to a pending "history" operation.
@@ -159,6 +159,10 @@ history_traits (void *cls,
const char *trait,
unsigned int index)
{
+ (void) cls;
+ (void) ret;
+ (void) trait;
+ (void) index;
/* Must define this function because some callbacks
* look for certain traits on _all_ the commands. */
return GNUNET_SYSERR;
@@ -184,7 +188,7 @@ test_cancelled (struct TALER_TESTING_Interpreter *is,
current_cmd = &is->commands[off];
TALER_LOG_INFO ("Is `%s' rejected?\n",
current_cmd->label);
- for (unsigned int i = 0; i<is->ip; i++)
+ for (int i = 0; i<is->ip; i++)
{
const struct TALER_TESTING_Command *c = &is->commands[i];
@@ -290,13 +294,10 @@ build_history_hit_limit (uint64_t total,
TALER_TESTING_get_trait_absolute_time (pos,
0,
&timestamp));
-
GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us !=
hs->end_date.abs_value_us);
-
return timestamp->abs_value_us >= hs->end_date.abs_value_us;
}
-
return total >= hs->num_results;
}
@@ -714,6 +715,7 @@ compute_result_count (struct TALER_TESTING_Interpreter *is)
return total;
}
+
/**
* Check that the "/history" response matches the
* CMD whose offset in the list of CMDs is @a off.
@@ -807,6 +809,7 @@ history_cb (void *cls,
struct TALER_TESTING_Interpreter *is = cls;
struct HistoryState *hs = is->commands[is->ip].cls;
+ (void) row_id;
/*NOTE: "204 No Content" is used to signal the end of results.*/
if (MHD_HTTP_NO_CONTENT == http_status)
{
@@ -819,16 +822,19 @@ history_cb (void *cls,
GNUNET_break (0);
total = build_history (is, &h);
- GNUNET_log
- (GNUNET_ERROR_TYPE_ERROR,
- "Expected history of length %llu, got %llu;"
- " HTTP status code: %u, failed: %d\n",
- (unsigned long long) total,
- (unsigned long long) hs->results_obtained,
- http_status,
- hs->failed);
- print_expected (h, total, UINT_MAX);
- free_history (h, total);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected history of length %llu, got %llu;"
+ " HTTP status code: %u/%d, failed: %d\n",
+ (unsigned long long) total,
+ (unsigned long long) hs->results_obtained,
+ http_status,
+ (int) ec,
+ hs->failed);
+ print_expected (h,
+ total,
+ UINT_MAX);
+ free_history (h,
+ total);
TALER_TESTING_interpreter_fail (is);
return;
}
@@ -839,10 +845,9 @@ history_cb (void *cls,
if (MHD_HTTP_OK != http_status)
{
hs->hh = NULL;
- GNUNET_log
- (GNUNET_ERROR_TYPE_ERROR,
- "Unwanted response code from /history[-range]: %u\n",
- http_status);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unwanted response code from /history[-range]: %u\n",
+ http_status);
TALER_TESTING_interpreter_fail (is);
return;
}
@@ -892,6 +897,7 @@ history_run (void *cls,
const uint64_t *row_id_ptr = &row_id;
struct TALER_BANK_AuthenticationData *auth;
+ (void) cmd;
/* Get row_id from trait. */
if (NULL != hs->start_row_reference)
{
@@ -940,15 +946,14 @@ history_range_run (void *cls,
const struct TALER_TESTING_Command *cmd,
struct TALER_TESTING_Interpreter *is)
{
-
struct HistoryState *hs = cls;
const struct GNUNET_TIME_Absolute *start_date;
const struct GNUNET_TIME_Absolute *end_date;
struct TALER_BANK_AuthenticationData *auth;
+ (void) cmd;
if (NULL != hs->start_row_reference)
{
-
const struct TALER_TESTING_Command *history_cmd;
history_cmd = TALER_TESTING_interpreter_lookup_command
@@ -972,7 +977,6 @@ history_range_run (void *cls,
if (NULL != hs->end_row_reference)
{
-
const struct TALER_TESTING_Command *history_cmd;
history_cmd = TALER_TESTING_interpreter_lookup_command
@@ -1017,18 +1021,17 @@ history_range_run (void *cls,
* @param cmd the command which is being cleaned up.
*/
static void
-history_cleanup
- (void *cls,
- const struct TALER_TESTING_Command *cmd)
+history_cleanup (void *cls,
+ const struct TALER_TESTING_Command *cmd)
{
struct HistoryState *hs = cls;
+ (void) cmd;
if (NULL != hs->hh)
{
TALER_LOG_WARNING ("/history did not complete\n");
TALER_BANK_history_cancel (hs->hh);
}
-
GNUNET_free (hs);
}
@@ -1041,24 +1044,22 @@ history_cleanup
* operation.
* @param account_no bank account number to ask the history for.
* @param direction which direction this operation is interested.
- * @param ascending if GNUNET_YES, the bank will return the rows
+ * @param ascending if #GNUNET_YES, the bank will return the rows
* in ascending (= chronological) order.
* @param start_row_reference reference to a command that can
* offer a row identifier, to be used as the starting row
* to accept in the result.
- * @param num_result how many rows we want in the result.
- *
+ * @param num_results how many rows we want in the result.
* @return the command.
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_bank_history
- (const char *label,
- const char *bank_url,
- uint64_t account_no,
- enum TALER_BANK_Direction direction,
- unsigned int ascending,
- const char *start_row_reference,
- long long num_results)
+TALER_TESTING_cmd_bank_history (const char *label,
+ const char *bank_url,
+ uint64_t account_no,
+ enum TALER_BANK_Direction direction,
+ unsigned int ascending,
+ const char *start_row_reference,
+ unsigned long long num_results)
{
struct HistoryState *hs;
@@ -1072,15 +1073,17 @@ TALER_TESTING_cmd_bank_history
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
- struct TALER_TESTING_Command cmd = {
- .label = label,
- .cls = hs,
- .run = &history_run,
- .cleanup = &history_cleanup,
- .traits = &history_traits
- };
-
- return cmd;
+ {
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = hs,
+ .run = &history_run,
+ .cleanup = &history_cleanup,
+ .traits = &history_traits
+ };
+
+ return cmd;
+ }
}
@@ -1124,15 +1127,17 @@ TALER_TESTING_cmd_bank_history_range
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
- struct TALER_TESTING_Command cmd = {
- .label = label,
- .cls = hs,
- .run = &history_range_run,
- .cleanup = &history_cleanup,
- .traits = &history_traits
- };
-
- return cmd;
+ {
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = hs,
+ .run = &history_range_run,
+ .cleanup = &history_cleanup,
+ .traits = &history_traits
+ };
+
+ return cmd;
+ }
}
@@ -1173,15 +1178,17 @@ TALER_TESTING_cmd_bank_history_range_with_dates
hs->start_date = start_date;
hs->end_date = end_date;
- struct TALER_TESTING_Command cmd = {
- .label = label,
- .cls = hs,
- .run = &history_range_run,
- .cleanup = &history_cleanup,
- .traits = &history_traits
- };
-
- return cmd;
+ {
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = hs,
+ .run = &history_range_run,
+ .cleanup = &history_cleanup,
+ .traits = &history_traits
+ };
+
+ return cmd;
+ }
}
/* end of testing_api_cmd_history.c */
diff --git a/src/bank-lib/testing_api_cmd_reject.c b/src/bank-lib/testing_api_cmd_reject.c
index 1f19a379..8d37266d 100644
--- a/src/bank-lib/testing_api_cmd_reject.c
+++ b/src/bank-lib/testing_api_cmd_reject.c
@@ -79,14 +79,16 @@ reject_cb (void *cls,
{
GNUNET_break (0);
fprintf (stderr,
- "Unexpected response code %u:\n",
- http_status);
+ "Unexpected response code %u/%d\n",
+ http_status,
+ (int) ec);
TALER_TESTING_interpreter_fail (is);
return;
}
TALER_TESTING_interpreter_next (is);
}
+
/**
* Cleanup the state of a "reject" CMD, and possibly
* cancel a pending operation thereof.
@@ -95,21 +97,21 @@ reject_cb (void *cls,
* @param cmd the command.
*/
static void
-reject_cleanup
- (void *cls,
- const struct TALER_TESTING_Command *cmd)
+reject_cleanup (void *cls,
+ const struct TALER_TESTING_Command *cmd)
{
struct RejectState *rs = cls;
+ (void) cmd;
if (NULL != rs->rh)
{
TALER_LOG_WARNING ("/reject did not complete\n");
TALER_BANK_reject_cancel (rs->rh);
}
-
GNUNET_free (rs);
}
+
/**
* Run the command.
*
@@ -128,19 +130,18 @@ reject_run (void *cls,
const uint64_t *row_id;
extern struct TALER_BANK_AuthenticationData AUTHS[];
- deposit_cmd = TALER_TESTING_interpreter_lookup_command
- (is, rs->deposit_reference);
-
+ (void) cmd;
+ deposit_cmd
+ = TALER_TESTING_interpreter_lookup_command (is,
+ rs->deposit_reference);
if (NULL == deposit_cmd)
TALER_TESTING_FAIL (is);
-
- GNUNET_assert
- (GNUNET_OK == TALER_TESTING_GET_TRAIT_CREDIT_ACCOUNT
- (deposit_cmd, &credit_account));
-
- GNUNET_assert
- (GNUNET_OK == TALER_TESTING_GET_TRAIT_ROW_ID
- (deposit_cmd, &row_id));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_TESTING_GET_TRAIT_CREDIT_ACCOUNT (deposit_cmd,
+ &credit_account));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_TESTING_GET_TRAIT_ROW_ID (deposit_cmd,
+ &row_id));
TALER_LOG_INFO ("Account %llu rejects deposit\n",
(unsigned long long) *credit_account);
rs->rh = TALER_BANK_reject (is->ctx,
@@ -191,7 +192,6 @@ reject_traits (void *cls,
* @param deposit_reference reference to a command that will
* provide a "row id" and credit (bank) account to craft
* the "reject" request.
- *
* @return the command.
*/
struct TALER_TESTING_Command
@@ -205,16 +205,17 @@ TALER_TESTING_cmd_bank_reject (const char *label,
rs->bank_url = bank_url;
rs->deposit_reference = deposit_reference;
- struct TALER_TESTING_Command cmd = {
- .cls = rs,
- .run = &reject_run,
- .cleanup = &reject_cleanup,
- .label = label,
- .traits = &reject_traits
- };
-
- return cmd;
-
+ {
+ struct TALER_TESTING_Command cmd = {
+ .cls = rs,
+ .run = &reject_run,
+ .cleanup = &reject_cleanup,
+ .label = label,
+ .traits = &reject_traits
+ };
+
+ return cmd;
+ }
}
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 89cd6582..fffb652c 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -476,6 +476,7 @@ cleanup_au (void)
static void
shutdown_task (void *cls)
{
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Running shutdown\n");
if (NULL != task)
@@ -626,8 +627,11 @@ refund_by_coin_cb (void *cls,
{
struct AggregationUnit *aux = cls;
+ (void) merchant_sig;
+ (void) rtransaction_id;
+ (void) refund_fee;
/* TODO: potential optimization: include these conditions
- in the SELECT! */
+ in the SELECT, and avoid fetching the values we do not need! */
if (0 != GNUNET_memcmp (merchant_pub,
&aux->merchant_pub))
return GNUNET_OK; /* different merchant */
@@ -675,6 +679,10 @@ deposit_cb (void *cls,
{
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
+ /* NOTE: potential optimization: use custom SQL API to not
+ fetch this one: */
+ (void) wire_deadline; /* already checked by SQL query */
au->merchant_pub = *merchant_pub;
if (GNUNET_SYSERR ==
TALER_amount_subtract (&au->total_amount,
@@ -688,7 +696,6 @@ deposit_cb (void *cls,
return GNUNET_DB_STATUS_HARD_ERROR;
}
au->row_id = row_id;
-
au->h_contract = h_contract_terms;
qs = db_plugin->select_refunds_by_coin (db_plugin->cls,
au->session,
@@ -804,6 +811,11 @@ aggregate_cb (void *cls,
struct TALER_Amount delta;
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
+ /* NOTE: potential optimization: use custom SQL API to not
+ fetch these: */
+ (void) wire_deadline; /* checked by SQL */
+ (void) wire; /* must match */
GNUNET_break (0 == GNUNET_memcmp (&au->merchant_pub,
merchant_pub));
/* compute contribution of this coin after fees */
@@ -1078,6 +1090,9 @@ expired_reserve_cb (void *cls,
enum GNUNET_DB_QueryStatus qs;
struct WireAccount *wa;
+ /* NOTE: potential optimization: use custom SQL API to not
+ fetch this: */
+ (void) expiration_date; /* we know it expired */
GNUNET_assert (NULL == ctc);
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
@@ -1218,6 +1233,7 @@ run_reserve_closures (void *cls)
struct ExpiredReserveContext erc;
struct GNUNET_TIME_Absolute now;
+ (void) cls;
task = NULL;
reserves_idle = GNUNET_NO;
tc = GNUNET_SCHEDULER_get_task_context ();
@@ -1305,6 +1321,7 @@ run_aggregation (void *cls)
enum GNUNET_DB_QueryStatus qs;
const struct GNUNET_SCHEDULER_TaskContext *tc;
+ (void) cls;
task = NULL;
tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
@@ -1554,6 +1571,7 @@ prepare_cb (void *cls,
struct TALER_EXCHANGEDB_Session *session = au->session;
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
GNUNET_free_non_null (au->additional_rows);
au->additional_rows = NULL;
if (NULL == buf)
@@ -1663,6 +1681,9 @@ wire_confirm_cb (void *cls,
struct TALER_EXCHANGEDB_Session *session = wpd->session;
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
+ (void) row_id;
+ (void) row_id_size;
wpd->eh = NULL;
if (GNUNET_SYSERR == success)
{
@@ -1747,6 +1768,7 @@ wire_prepare_cb (void *cls,
const char *buf,
size_t buf_size)
{
+ (void) cls;
wpd->row_id = rowid;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Starting wire transfer %llu\n",
@@ -1798,6 +1820,7 @@ run_transfers (void *cls)
struct TALER_EXCHANGEDB_Session *session;
const struct GNUNET_SCHEDULER_TaskContext *tc;
+ (void) cls;
task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Checking for pending wire transfers\n");
@@ -1877,6 +1900,9 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
+ (void) cls;
+ (void) args;
+ (void) cfgfile;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (c,
"exchange",
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index 8b89cf97..bdb213a8 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -167,8 +167,11 @@ handle_mhd_completion_callback (void *cls,
{
struct ExchangeHttpRequestClosure *ecls = *con_cls;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Request completed\n");
-
+ (void) cls;
+ (void) connection;
+ (void) toe;
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Request completed\n");
if (NULL == ecls)
return;
TEH_PARSE_post_cleanup_callback (ecls->opaque_post_parsing_context);
@@ -186,14 +189,14 @@ handle_mhd_completion_callback (void *cls,
* Return GNUNET_YES if given a valid correlation ID and
* GNUNET_NO otherwise.
*
- * @returns GNUNET_YES iff given a valid correlation ID
+ * @returns #GNUNET_YES iff given a valid correlation ID
*/
static int
is_valid_correlation_id (const char *correlation_id)
{
if (strlen (correlation_id) >= 64)
return GNUNET_NO;
- for (int i = 0; i < strlen (correlation_id); i++)
+ for (size_t i = 0; i < strlen (correlation_id); i++)
if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-')))
return GNUNET_NO;
return GNUNET_YES;
@@ -401,7 +404,7 @@ handle_mhd_request (void *cls,
"Only POST is allowed", 0,
&TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
#endif
- { NULL, NULL, NULL, NULL, 0, 0 }
+ { NULL, NULL, NULL, NULL, 0, NULL, 0 }
};
static struct TEH_RequestHandler h404 = {
"", NULL, "text/html",
@@ -415,6 +418,8 @@ handle_mhd_request (void *cls,
struct GNUNET_AsyncScopeSave old_scope;
const char *correlation_id = NULL;
+ (void) cls;
+ (void) version;
if (NULL == ecls)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n");
@@ -817,6 +822,9 @@ connection_done (void *cls,
void **socket_context,
enum MHD_ConnectionNotificationCode toe)
{
+ (void) cls;
+ (void) connection;
+ (void) socket_context;
/* We only act if the connection is closed. */
if (MHD_CONNECTION_NOTIFY_CLOSED != toe)
return;
@@ -849,6 +857,7 @@ handle_mhd_logs (void *cls,
static int cache;
char buf[2048];
+ (void) cls;
if (-1 == cache)
return;
if (0 == cache)
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c
index 4eb5af5d..f9cda8a5 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -423,6 +423,8 @@ free_denom_key (void *cls,
{
struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki = value;
+ (void) cls;
+ (void) key;
if (NULL != dki->denom_priv.rsa_private_key)
GNUNET_CRYPTO_rsa_private_key_free (dki->denom_priv.rsa_private_key);
GNUNET_CRYPTO_rsa_public_key_free (dki->denom_pub.rsa_public_key);
@@ -698,7 +700,7 @@ TALER_EXCHANGE_conf_duration_provide ()
* @param cls closure with the `struct AddRevocationContext *`
* @param connection NULL
* @param session database session to use
- * @param[out] mhd_ret NULL
+ * @param[out] mhd_ret not used
* @return transaction status
*/
static enum GNUNET_DB_QueryStatus
@@ -712,6 +714,8 @@ add_revocations_transaction (void *cls,
struct TALER_MasterSignatureP master_sig;
uint64_t rowid;
+ (void) connection;
+ (void) mhd_ret;
qs = TEH_plugin->get_denomination_revocation (TEH_plugin->cls,
session,
&arc->dki->issue.properties.
@@ -736,7 +740,7 @@ add_revocations_transaction (void *cls,
* @param cls closure with the `const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *`
* @param connection NULL
* @param session database session to use
- * @param[out] mhd_ret NULL
+ * @param[out] mhd_ret not used
* @return transaction status
*/
static enum GNUNET_DB_QueryStatus
@@ -749,6 +753,8 @@ add_denomination_transaction (void *cls,
enum GNUNET_DB_QueryStatus qs;
struct TALER_EXCHANGEDB_DenominationKeyInformationP issue_exists;
+ (void) connection;
+ (void) mhd_ret;
qs = TEH_plugin->get_denomination_info (TEH_plugin->cls,
session,
&dki->issue.properties.denom_hash,
@@ -1314,6 +1320,7 @@ add_auditor_entry (void *cls,
struct AuditorEntry *ae = value;
json_t *ao;
+ (void) key;
ao = json_pack ("{s:o, s:s, s:o}",
"denomination_keys", ae->ar,
"auditor_url", ae->auditor_url,
@@ -2310,6 +2317,9 @@ TEH_KS_handler_keys (struct TEH_RequestHandler *rh,
struct GNUNET_TIME_Absolute now;
const struct KeysResponseData *krd;
+ (void) connection_cls;
+ (void) upload_data;
+ (void) upload_data_size;
have_cherrypick = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,
"last_issue_date");
diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c
index bfe406d6..fabd5278 100644
--- a/src/exchangedb/exchangedb_auditorkeys.c
+++ b/src/exchangedb/exchangedb_auditorkeys.c
@@ -119,7 +119,7 @@ auditor_iter (void *cls,
return GNUNET_OK;
}
af = GNUNET_malloc (size);
- if (size !=
+ if (((ssize_t) size) !=
GNUNET_DISK_fn_read (filename,
af,
size))
@@ -274,22 +274,22 @@ TALER_EXCHANGEDB_auditor_write (const char *filename,
&af,
wsize)))
goto cleanup;
- if (wrote != wsize)
+ if (wrote != (ssize_t) wsize)
goto cleanup;
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
- if (wsize ==
+ if (((ssize_t) wsize) ==
GNUNET_DISK_file_write (fh,
asigs,
wsize))
ret = GNUNET_OK;
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
- if (wsize ==
+ if (((ssize_t) wsize) ==
GNUNET_DISK_file_write (fh,
dki,
wsize))
ret = GNUNET_OK;
wsize = strlen (auditor_url) + 1;
- if (wsize ==
+ if (((ssize_t) wsize) ==
GNUNET_DISK_file_write (fh,
auditor_url,
wsize))
diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c
index 0584c2c6..5a26ce6b 100644
--- a/src/exchangedb/exchangedb_denomkeys.c
+++ b/src/exchangedb/exchangedb_denomkeys.c
@@ -134,7 +134,7 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
return GNUNET_SYSERR;
}
data = GNUNET_malloc (size);
- if (size !=
+ if (((ssize_t) size) !=
GNUNET_DISK_fn_read (filename,
data,
size))
@@ -217,14 +217,14 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
&dki->issue,
wsize)))
goto cleanup;
- if (wrote != wsize)
+ if (wrote != (ssize_t) wsize)
goto cleanup;
if (GNUNET_SYSERR ==
(wrote = GNUNET_DISK_file_write (fh,
priv_enc,
priv_enc_size)))
goto cleanup;
- if (wrote != priv_enc_size)
+ if (wrote != (ssize_t) priv_enc_size)
goto cleanup;
ret = GNUNET_OK;
cleanup:
diff --git a/src/exchangedb/plugin_exchangedb_common.c b/src/exchangedb/plugin_exchangedb_common.c
index 27142179..dac746b0 100644
--- a/src/exchangedb/plugin_exchangedb_common.c
+++ b/src/exchangedb/plugin_exchangedb_common.c
@@ -36,6 +36,7 @@ common_free_reserve_history (void *cls,
struct TALER_EXCHANGEDB_ReserveHistory *backref;
struct TALER_EXCHANGEDB_ClosingTransfer *closing;
+ (void) cls;
while (NULL != rh)
{
switch (rh->type)
@@ -81,6 +82,7 @@ common_free_coin_transaction_list (void *cls,
{
struct TALER_EXCHANGEDB_TransactionList *next;
+ (void) cls;
while (NULL != list)
{
next = list->next;
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index eaca4093..1dd40875 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1735,6 +1735,7 @@ postgres_start (void *cls,
GNUNET_PQ_EXECUTE_STATEMENT_END
};
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting transaction on %p\n",
session->conn);
@@ -1767,6 +1768,7 @@ postgres_rollback (void *cls,
GNUNET_PQ_EXECUTE_STATEMENT_END
};
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Rolling back transaction on %p\n",
session->conn);
@@ -1793,6 +1795,7 @@ postgres_commit (void *cls,
};
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
"do_commit",
params);
@@ -1818,6 +1821,7 @@ postgres_preflight (void *cls,
GNUNET_PQ_EXECUTE_STATEMENT_END
};
+ (void) cls;
if (NULL == session->transaction_name)
return; /* all good */
if (GNUNET_OK ==
@@ -1874,6 +1878,7 @@ postgres_insert_denomination_info (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
/* check fees match coin currency */
GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency_nbo (&issue->properties.value,
@@ -2137,6 +2142,7 @@ reserves_update (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"reserve_update",
params);
@@ -2335,6 +2341,7 @@ postgres_get_latest_reserve_in_reference (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"reserves_in_get_latest_wire_reference",
params,
@@ -2957,6 +2964,7 @@ postgres_mark_deposit_tiny (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"mark_deposit_tiny",
params);
@@ -2994,6 +3002,7 @@ postgres_test_deposit_done (void *cls,
};
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"test_deposit_done",
params,
@@ -3028,6 +3037,7 @@ postgres_mark_deposit_done (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"mark_deposit_done",
params);
@@ -3346,6 +3356,7 @@ insert_known_coin (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating known coin %s\n",
TALER_B2S (&coin_info->coin_pub));
@@ -3380,6 +3391,7 @@ postgres_count_known_coins (void *cls,
};
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"count_known_coins",
params,
@@ -3473,14 +3485,7 @@ postgres_insert_deposit (void *cls,
GNUNET_PQ_query_param_end
};
-#if 0
- enum GNUNET_DB_QueryStatus qs;
-
- if (0 > (qs = postgres_ensure_coin_known (cls,
- session,
- &deposit->coin)))
- return qs;
-#endif
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Inserting deposit to be executed at %s (%llu/%llu)\n",
GNUNET_STRINGS_absolute_time_to_string (deposit->wire_deadline),
@@ -3515,6 +3520,7 @@ postgres_insert_refund (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency (&refund->refund_amount,
&refund->refund_fee));
@@ -3733,6 +3739,7 @@ postgres_get_melt_index (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"get_melt_index",
params,
@@ -3762,14 +3769,8 @@ postgres_insert_melt (void *cls,
GNUNET_PQ_query_param_uint32 (&refresh_session->noreveal_index),
GNUNET_PQ_query_param_end
};
-#if 0
- enum GNUNET_DB_QueryStatus qs;
- if (0 > (qs = postgres_ensure_coin_known (cls,
- session,
- &refresh_session->coin)))
- return qs;
-#endif
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"insert_melt",
params);
@@ -3803,6 +3804,7 @@ postgres_insert_refresh_reveal (void *cls,
const struct TALER_TransferPrivateKeyP *tprivs,
const struct TALER_TransferPublicKeyP *tp)
{
+ (void) cls;
if (TALER_CNC_KAPPA != num_tprivs + 1)
{
GNUNET_break (0);
@@ -3972,6 +3974,7 @@ postgres_get_refresh_reveal (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
/* First get the coins */
memset (&grctx,
0,
@@ -4098,6 +4101,7 @@ free_link_data_list (void *cls,
{
struct TALER_EXCHANGEDB_LinkDataList *next;
+ (void) cls;
while (NULL != ldl)
{
next = ldl->next;
@@ -5090,6 +5094,7 @@ postgres_insert_aggregation_tracking (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"insert_aggregation_tracking",
params);
@@ -5456,6 +5461,7 @@ postgres_wire_prepare_data_insert (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_prepare_data_insert",
params);
@@ -5481,6 +5487,7 @@ postgres_wire_prepare_data_mark_finished (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_prepare_data_mark_done",
params);
@@ -5522,6 +5529,7 @@ postgres_wire_prepare_data_get (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"wire_prepare_data_get",
params,
@@ -5610,6 +5618,7 @@ postgres_store_wire_transfer_out (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"insert_wire_out",
params);
@@ -7231,6 +7240,7 @@ postgres_insert_payback_refresh_request (void *cls,
};
enum GNUNET_DB_QueryStatus qs;
+ (void) cls;
/* now store actual payback information */
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
"payback_refresh_insert",
@@ -7270,6 +7280,7 @@ postgres_get_reserve_by_h_blind (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"reserve_by_h_blind",
params,
@@ -7303,6 +7314,7 @@ postgres_get_old_coin_by_h_blind (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"old_coin_by_h_blind",
params,
@@ -7335,6 +7347,7 @@ postgres_insert_denomination_revocation (void *cls,
GNUNET_PQ_query_param_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"denomination_revocation_insert",
params);
@@ -7370,6 +7383,7 @@ postgres_get_denomination_revocation (void *cls,
GNUNET_PQ_result_spec_end
};
+ (void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"denomination_revocation_get",
params,
diff --git a/src/include/taler_testing_bank_lib.h b/src/include/taler_testing_bank_lib.h
index 1152c629..57a7c0f9 100644
--- a/src/include/taler_testing_bank_lib.h
+++ b/src/include/taler_testing_bank_lib.h
@@ -108,13 +108,12 @@ TALER_TESTING_has_in_name (const char *prog,
* operation.
* @param account_no bank account number to ask the history for.
* @param direction which direction this operation is interested
- * @param ascending if GNUNET_YES, it ask the bank to return results
+ * @param ascending if #GNUNET_YES, it ask the bank to return results
* in chronological order.
* @param start_row_reference reference to a command that can
* offer a row identifier, to be used as the starting row
* to accept in the result.
- * @param num_result how many rows we want in the result.
- *
+ * @param num_results how many rows we want in the result.
* @return the command.
*/
struct TALER_TESTING_Command
@@ -124,7 +123,7 @@ TALER_TESTING_cmd_bank_history (const char *label,
enum TALER_BANK_Direction direction,
unsigned int ascending,
const char *start_row_reference,
- long long num_results);
+ unsigned long long num_results);
/**
diff --git a/src/wire-plugins/plugin_wire_ebics.c b/src/wire-plugins/plugin_wire_ebics.c
index 5482762a..1c74efd5 100644
--- a/src/wire-plugins/plugin_wire_ebics.c
+++ b/src/wire-plugins/plugin_wire_ebics.c
@@ -132,6 +132,14 @@ ebics_prepare_wire_transfer (void *cls,
TALER_WIRE_PrepareTransactionCallback psc,
void *psc_cls)
{
+ (void) cls;
+ (void) origin_account_section;
+ (void) destination_account_url;
+ (void) amount;
+ (void) exchange_base_url;
+ (void) wtid;
+ (void) psc;
+ (void) psc_cls;
GNUNET_break (0); // FIXME: not implemented
return NULL;
}
@@ -148,6 +156,8 @@ static void
ebics_prepare_wire_transfer_cancel (void *cls,
struct TALER_WIRE_PrepareHandle *pth)
{
+ (void) cls;
+ (void) pth;
GNUNET_break (0); // FIXME: not implemented
}
@@ -169,6 +179,11 @@ ebics_execute_wire_transfer (void *cls,
TALER_WIRE_ConfirmationCallback cc,
void *cc_cls)
{
+ (void) cls;
+ (void) buf;
+ (void) buf_size;
+ (void) cc;
+ (void) cc_cls;
GNUNET_break (0); // FIXME: not implemented
return NULL;
}
@@ -190,6 +205,8 @@ static void
ebics_execute_wire_transfer_cancel (void *cls,
struct TALER_WIRE_ExecuteHandle *eh)
{
+ (void) cls;
+ (void) eh;
GNUNET_break (0); // FIXME: not implemented
}
@@ -226,6 +243,14 @@ ebics_get_history (void *cls,
TALER_WIRE_HistoryResultCallback hres_cb,
void *hres_cb_cls)
{
+ (void) cls;
+ (void) account_section;
+ (void) direction;
+ (void) start_off;
+ (void) start_off_len;
+ (void) num_results;
+ (void) hres_cb;
+ (void) hres_cb_cls;
GNUNET_break (0);
return NULL;
}
@@ -241,6 +266,8 @@ static void
ebics_get_history_cancel (void *cls,
struct TALER_WIRE_HistoryHandle *whh)
{
+ (void) cls;
+ (void) whh;
GNUNET_break (0);
}
@@ -315,6 +342,11 @@ ebics_reject_transfer (void *cls,
{
struct TALER_WIRE_RejectHandle *rh;
+ (void) account_section;
+ (void) start_off;
+ (void) start_off_len;
+ (void) rej_cb;
+ (void) rej_cb_cls;
GNUNET_break (0); /* not implemented, just a stub! */
rh = GNUNET_new (struct TALER_WIRE_RejectHandle);
rh->rej_cb = rej_cb;
@@ -343,6 +375,7 @@ ebics_reject_transfer_cancel (void *cls,
{
void *ret = rh->rej_cb_cls;
+ (void) cls;
GNUNET_SCHEDULER_cancel (rh->timeout_task);
GNUNET_free (rh);
return ret;
diff --git a/src/wire-plugins/plugin_wire_template.c b/src/wire-plugins/plugin_wire_template.c
index 0d0e652a..29c4553a 100644
--- a/src/wire-plugins/plugin_wire_template.c
+++ b/src/wire-plugins/plugin_wire_template.c
@@ -84,6 +84,8 @@ static enum TALER_ErrorCode
template_wire_validate (void *cls,
const char *account_url)
{
+ (void) cls;
+ (void) account_url;
GNUNET_break (0);
return TALER_EC_NOT_IMPLEMENTED;
}
@@ -114,6 +116,14 @@ template_prepare_wire_transfer (void *cls,
TALER_WIRE_PrepareTransactionCallback ptc,
void *ptc_cls)
{
+ (void) cls;
+ (void) origin_account_section;
+ (void) destination_account_url;
+ (void) amount;
+ (void) exchange_base_url;
+ (void) wtid;
+ (void) ptc;
+ (void) ptc_cls;
GNUNET_break (0);
return NULL;
}
@@ -130,6 +140,8 @@ static void
template_prepare_wire_transfer_cancel (void *cls,
struct TALER_WIRE_PrepareHandle *pth)
{
+ (void) cls;
+ (void) pth;
GNUNET_break (0);
}
@@ -151,6 +163,11 @@ template_execute_wire_transfer (void *cls,
TALER_WIRE_ConfirmationCallback cc,
void *cc_cls)
{
+ (void) cls;
+ (void) buf;
+ (void) buf_size;
+ (void) cc;
+ (void) cc_cls;
GNUNET_break (0);
return NULL;
}
@@ -172,6 +189,8 @@ static void
template_execute_wire_transfer_cancel (void *cls,
struct TALER_WIRE_ExecuteHandle *eh)
{
+ (void) cls;
+ (void) eh;
GNUNET_break (0);
}
@@ -208,6 +227,14 @@ template_get_history (void *cls,
TALER_WIRE_HistoryResultCallback hres_cb,
void *hres_cb_cls)
{
+ (void) cls;
+ (void) account_section;
+ (void) direction;
+ (void) start_off;
+ (void) start_off_len;
+ (void) num_results;
+ (void) hres_cb;
+ (void) hres_cb_cls;
GNUNET_break (0);
return NULL;
}
@@ -223,6 +250,8 @@ static void
template_get_history_cancel (void *cls,
struct TALER_WIRE_HistoryHandle *whh)
{
+ (void) cls;
+ (void) whh;
GNUNET_break (0);
}
@@ -254,6 +283,12 @@ template_reject_transfer (void *cls,
TALER_WIRE_RejectTransferCallback rej_cb,
void *rej_cb_cls)
{
+ (void) cls;
+ (void) account_section;
+ (void) start_off;
+ (void) start_off_len;
+ (void) rej_cb;
+ (void) rej_cb_cls;
GNUNET_break (0);
return NULL;
}
@@ -275,6 +310,8 @@ static void *
template_reject_transfer_cancel (void *cls,
struct TALER_WIRE_RejectHandle *rh)
{
+ (void) cls;
+ (void) rh;
GNUNET_break (0);
return NULL;
}