fix warnings

This commit is contained in:
Christian Grothoff 2020-01-18 17:22:13 +01:00
parent d4abdb7a28
commit 684da791cc
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
7 changed files with 74 additions and 4 deletions

View File

@ -838,6 +838,7 @@ postgres_rollback (void *cls,
GNUNET_PQ_EXECUTE_STATEMENT_END GNUNET_PQ_EXECUTE_STATEMENT_END
}; };
(void) cls;
GNUNET_break (GNUNET_OK == GNUNET_break (GNUNET_OK ==
GNUNET_PQ_exec_statements (session->conn, GNUNET_PQ_exec_statements (session->conn,
es)); es));
@ -859,6 +860,7 @@ postgres_commit (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"do_commit", "do_commit",
params); params);
@ -936,6 +938,7 @@ postgres_insert_exchange (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_insert_exchange", "auditor_insert_exchange",
params); params);
@ -962,6 +965,7 @@ postgres_delete_exchange (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_delete_exchange", "auditor_delete_exchange",
params); params);
@ -1007,6 +1011,7 @@ exchange_info_cb (void *cls,
{ {
struct ExchangeInfoContext *eic = cls; struct ExchangeInfoContext *eic = cls;
(void) cls;
for (unsigned int i = 0; i < num_results; i++) for (unsigned int i = 0; i < num_results; i++)
{ {
struct TALER_MasterPublicKeyP master_pub; struct TALER_MasterPublicKeyP master_pub;
@ -1059,6 +1064,7 @@ postgres_list_exchanges (void *cls,
}; };
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
(void) cls;
qs = GNUNET_PQ_eval_prepared_multi_select (session->conn, qs = GNUNET_PQ_eval_prepared_multi_select (session->conn,
"auditor_list_exchanges", "auditor_list_exchanges",
params, params,
@ -1095,6 +1101,7 @@ postgres_insert_exchange_signkey (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_insert_exchange_signkey", "auditor_insert_exchange_signkey",
params); params);
@ -1130,6 +1137,7 @@ postgres_insert_deposit_confirmation (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_deposit_confirmation_insert", "auditor_deposit_confirmation_insert",
params); params);
@ -1314,6 +1322,7 @@ postgres_insert_denomination_info (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
/* check fees match coin currency */ /* check fees match coin currency */
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency_nbo (&issue->value, TALER_amount_cmp_currency_nbo (&issue->value,
@ -1456,6 +1465,7 @@ postgres_select_denomination_info (void *cls,
}; };
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
(void) cls;
qs = GNUNET_PQ_eval_prepared_multi_select (session->conn, qs = GNUNET_PQ_eval_prepared_multi_select (session->conn,
"auditor_denominations_select", "auditor_denominations_select",
params, params,
@ -1497,6 +1507,7 @@ postgres_insert_auditor_progress_reserve (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_insert_reserve", "auditor_progress_insert_reserve",
params); params);
@ -1532,6 +1543,7 @@ postgres_update_auditor_progress_reserve (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_update_reserve", "auditor_progress_update_reserve",
params); params);
@ -1571,6 +1583,7 @@ postgres_get_auditor_progress_reserve (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_progress_select_reserve", "auditor_progress_select_reserve",
params, params,
@ -1604,6 +1617,7 @@ postgres_insert_auditor_progress_aggregation (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_insert_aggregation", "auditor_progress_insert_aggregation",
params); params);
@ -1636,6 +1650,7 @@ postgres_update_auditor_progress_aggregation (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_update_aggregation", "auditor_progress_update_aggregation",
params); params);
@ -1671,6 +1686,7 @@ postgres_get_auditor_progress_aggregation (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_progress_select_aggregation", "auditor_progress_select_aggregation",
params, params,
@ -1706,6 +1722,7 @@ postgres_insert_auditor_progress_deposit_confirmation (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_insert_deposit_confirmation", "auditor_progress_insert_deposit_confirmation",
params); params);
@ -1740,6 +1757,7 @@ postgres_update_auditor_progress_deposit_confirmation (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_update_deposit_confirmation", "auditor_progress_update_deposit_confirmation",
params); params);
@ -1777,6 +1795,7 @@ postgres_get_auditor_progress_deposit_confirmation (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_progress_select_deposit_confirmation", "auditor_progress_select_deposit_confirmation",
params, params,
@ -1813,6 +1832,7 @@ postgres_insert_auditor_progress_coin (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_insert_coin", "auditor_progress_insert_coin",
params); params);
@ -1848,6 +1868,7 @@ postgres_update_auditor_progress_coin (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_progress_update_coin", "auditor_progress_update_coin",
params); params);
@ -1891,6 +1912,7 @@ postgres_get_auditor_progress_coin (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_progress_select_coin", "auditor_progress_select_coin",
params, params,
@ -1935,6 +1957,7 @@ postgres_insert_wire_auditor_account_progress (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_auditor_account_progress_insert", "wire_auditor_account_progress_insert",
params); params);
@ -1978,6 +2001,7 @@ postgres_update_wire_auditor_account_progress (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_auditor_account_progress_update", "wire_auditor_account_progress_update",
params); params);
@ -2026,6 +2050,7 @@ postgres_get_wire_auditor_account_progress (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"wire_auditor_account_progress_select", "wire_auditor_account_progress_select",
params, params,
@ -2058,6 +2083,7 @@ postgres_insert_wire_auditor_progress (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_auditor_progress_insert", "wire_auditor_progress_insert",
params); params);
@ -2089,6 +2115,7 @@ postgres_update_wire_auditor_progress (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"wire_auditor_progress_update", "wire_auditor_progress_update",
params); params);
@ -2123,6 +2150,7 @@ postgres_get_wire_auditor_progress (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"wire_auditor_progress_select", "wire_auditor_progress_select",
params, params,
@ -2165,6 +2193,7 @@ postgres_insert_reserve_info (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency (reserve_balance, TALER_amount_cmp_currency (reserve_balance,
withdraw_fee_balance)); withdraw_fee_balance));
@ -2207,6 +2236,7 @@ postgres_update_reserve_info (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency (reserve_balance, TALER_amount_cmp_currency (reserve_balance,
withdraw_fee_balance)); withdraw_fee_balance));
@ -2238,6 +2268,7 @@ postgres_del_reserve_info (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_reserves_delete", "auditor_reserves_delete",
params); params);
@ -2285,6 +2316,7 @@ postgres_get_reserve_info (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_reserves_select", "auditor_reserves_select",
params, params,
@ -2320,6 +2352,7 @@ postgres_insert_reserve_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency (reserve_balance, TALER_amount_cmp_currency (reserve_balance,
withdraw_fee_balance)); withdraw_fee_balance));
@ -2358,6 +2391,7 @@ postgres_update_reserve_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_reserve_balance_update", "auditor_reserve_balance_update",
params); params);
@ -2394,6 +2428,7 @@ postgres_get_reserve_summary (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_reserve_balance_select", "auditor_reserve_balance_select",
params, params,
@ -2424,6 +2459,7 @@ postgres_insert_wire_fee_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_wire_fee_balance_insert", "auditor_wire_fee_balance_insert",
params); params);
@ -2453,6 +2489,7 @@ postgres_update_wire_fee_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_wire_fee_balance_update", "auditor_wire_fee_balance_update",
params); params);
@ -2485,6 +2522,7 @@ postgres_get_wire_fee_summary (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_wire_fee_balance_select", "auditor_wire_fee_balance_select",
params, params,
@ -2527,6 +2565,7 @@ postgres_insert_denomination_balance (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_denomination_pending_insert", "auditor_denomination_pending_insert",
params); params);
@ -2568,6 +2607,7 @@ postgres_update_denomination_balance (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_denomination_pending_update", "auditor_denomination_pending_update",
params); params);
@ -2611,6 +2651,7 @@ postgres_get_denomination_balance (void *cls,
GNUNET_PQ_result_spec_end GNUNET_PQ_result_spec_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn, return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"auditor_denomination_pending_select", "auditor_denomination_pending_select",
params, params,
@ -2659,6 +2700,7 @@ postgres_insert_balance_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
TALER_amount_cmp_currency (denom_balance, TALER_amount_cmp_currency (denom_balance,
deposit_fee_balance)); deposit_fee_balance));
@ -2717,6 +2759,7 @@ postgres_update_balance_summary (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_balance_summary_update", "auditor_balance_summary_update",
params); params);
@ -2810,6 +2853,7 @@ postgres_insert_historic_denom_revenue (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_historic_denomination_revenue_insert", "auditor_historic_denomination_revenue_insert",
params); params);
@ -2971,6 +3015,7 @@ postgres_insert_historic_reserve_revenue (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_historic_reserve_summary_insert", "auditor_historic_reserve_summary_insert",
params); params);
@ -3119,6 +3164,7 @@ postgres_insert_predicted_result (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_predicted_result_insert", "auditor_predicted_result_insert",
params); params);
@ -3148,6 +3194,7 @@ postgres_update_predicted_result (void *cls,
GNUNET_PQ_query_param_end GNUNET_PQ_query_param_end
}; };
(void) cls;
return GNUNET_PQ_eval_prepared_non_select (session->conn, return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_predicted_result_update", "auditor_predicted_result_update",
params); params);

View File

@ -119,6 +119,7 @@ history_cb (void *cls,
(void) cls; (void) cls;
(void) ec; (void) ec;
(void) http_status; (void) http_status;
(void) json;
if (NULL == details) if (NULL == details)
{ {
fprintf (stdout, fprintf (stdout,
@ -129,8 +130,13 @@ history_cb (void *cls,
} }
fprintf (stdout, fprintf (stdout,
"%llu\n", "%llu: %s->%s (%s) over %s at %s\n",
(unsigned long long) serial_id); (unsigned long long) serial_id,
details->debit_account_url,
details->credit_account_url,
TALER_B2S (&details->reserve_pub),
TALER_amount2s (&details->amount),
GNUNET_STRINGS_absolute_time_to_string (details->execution_date));
return GNUNET_OK; return GNUNET_OK;
} }
@ -152,6 +158,7 @@ confirmation_cb (void *cls,
uint64_t row_id, uint64_t row_id,
struct GNUNET_TIME_Absolute timestamp) struct GNUNET_TIME_Absolute timestamp)
{ {
(void) cls;
if (MHD_HTTP_OK != response_code) if (MHD_HTTP_OK != response_code)
{ {
fprintf (stderr, fprintf (stderr,
@ -162,7 +169,9 @@ confirmation_cb (void *cls,
} }
fprintf (stdout, fprintf (stdout,
"Wire transfer executed successfully.\n"); "Wire transfer #%llu executed successfully at %s.\n",
(unsigned long long) row_id,
GNUNET_STRINGS_absolute_time_to_string (timestamp));
global_ret = 0; global_ret = 0;
GNUNET_SCHEDULER_shutdown (); GNUNET_SCHEDULER_shutdown ();
} }
@ -255,6 +264,7 @@ execute_history ()
static void static void
do_shutdown (void *cls) do_shutdown (void *cls)
{ {
(void) cls;
if (NULL != ctx) if (NULL != ctx)
{ {
GNUNET_CURL_fini (ctx); GNUNET_CURL_fini (ctx);
@ -294,6 +304,9 @@ run (void *cls,
const char *cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg) const struct GNUNET_CONFIGURATION_Handle *cfg)
{ {
(void) cls;
(void) args;
(void) cfgfile;
if (NULL == account_section) if (NULL == account_section)
{ {
fprintf (stderr, fprintf (stderr,

View File

@ -1639,6 +1639,7 @@ wire_confirm_cb (void *cls,
(void) cls; (void) cls;
(void) row_id; (void) row_id;
(void) wire_timestamp;
wpd->eh = NULL; wpd->eh = NULL;
if (MHD_HTTP_OK != http_status_code) if (MHD_HTTP_OK != http_status_code)
{ {

View File

@ -137,6 +137,10 @@ TEH_RESERVE_handler_reserve_status (struct TEH_RequestHandler *rh,
int res; int res;
int mhd_ret; int mhd_ret;
(void) rh;
(void) connection_cls;
(void) upload_data;
(void) upload_data_size;
res = TALER_MHD_parse_request_arg_data (connection, res = TALER_MHD_parse_request_arg_data (connection,
"reserve_pub", "reserve_pub",
&rsc.reserve_pub, &rsc.reserve_pub,

View File

@ -502,6 +502,10 @@ TEH_TRACKING_handler_track_transfer (struct TEH_RequestHandler *rh,
int res; int res;
int mhd_ret; int mhd_ret;
(void) rh;
(void) connection_cls;
(void) upload_data;
(void) upload_data_size;
memset (&ctx, 0, sizeof (ctx)); memset (&ctx, 0, sizeof (ctx));
res = TALER_MHD_parse_request_arg_data (connection, res = TALER_MHD_parse_request_arg_data (connection,
"wtid", "wtid",

View File

@ -137,7 +137,7 @@ TEH_WIRE_handler_wire (struct TEH_RequestHandler *rh,
size_t *upload_data_size) size_t *upload_data_size)
{ {
(void) rh; (void) rh;
(void) connection; (void) connection_cls;
(void) upload_data; (void) upload_data;
(void) upload_data_size; (void) upload_data_size;
GNUNET_assert (NULL != wire_methods); GNUNET_assert (NULL != wire_methods);

View File

@ -334,6 +334,7 @@ history_cb (void *cls,
struct TALER_EXCHANGEDB_Session *session = cls; struct TALER_EXCHANGEDB_Session *session = cls;
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
(void) json;
if (NULL == details) if (NULL == details)
{ {
hh = NULL; hh = NULL;