summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange')
-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
3 files changed, 54 insertions, 9 deletions
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");