aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb')
-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
4 files changed, 39 insertions, 23 deletions
diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c
index bfe406d6d..fabd5278f 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 0584c2c6d..5a26ce6bd 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 271421795..dac746b09 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 eaca40936..1dd408752 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,