From b0d00823eb96de733510354366246a94c6636b9f Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 22 Oct 2018 12:29:34 +0200 Subject: Fix compiler warnings. --- src/bank-lib/bank_api_admin.c | 2 +- src/bank-lib/bank_api_history.c | 2 +- src/bank-lib/bank_api_reject.c | 2 +- src/exchange-lib/exchange_api_deposit.c | 2 +- src/exchange-lib/exchange_api_handle.c | 3 +-- src/exchange-lib/exchange_api_payback.c | 2 +- src/exchange-lib/exchange_api_refresh.c | 4 ++-- src/exchange-lib/exchange_api_refresh_link.c | 2 +- src/exchange-lib/exchange_api_refund.c | 2 +- src/exchange-lib/exchange_api_reserve.c | 4 ++-- src/exchange-lib/exchange_api_track_transaction.c | 2 +- src/exchange-lib/exchange_api_track_transfer.c | 2 +- src/exchange-lib/exchange_api_wire.c | 2 +- src/include/taler_json_lib.h | 6 ++++++ 14 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index f89b0143f..a18b95c3f 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -247,7 +247,7 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx, aai->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_NO, - &handle_admin_add_incoming_finished, + (GC_JCC) &handle_admin_add_incoming_finished, aai); return aai; } diff --git a/src/bank-lib/bank_api_history.c b/src/bank-lib/bank_api_history.c index fa53a5bba..46be1085a 100644 --- a/src/bank-lib/bank_api_history.c +++ b/src/bank-lib/bank_api_history.c @@ -350,7 +350,7 @@ TALER_BANK_history (struct GNUNET_CURL_Context *ctx, hh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_NO, - &handle_history_finished, + (GC_JCC) &handle_history_finished, hh); return hh; } diff --git a/src/bank-lib/bank_api_reject.c b/src/bank-lib/bank_api_reject.c index 531851735..00a49bd16 100644 --- a/src/bank-lib/bank_api_reject.c +++ b/src/bank-lib/bank_api_reject.c @@ -215,7 +215,7 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx, rh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_NO, - &handle_reject_finished, + (GC_JCC) &handle_reject_finished, rh); return rh; } diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c index 27711770a..71a1f2d68 100644 --- a/src/exchange-lib/exchange_api_deposit.c +++ b/src/exchange-lib/exchange_api_deposit.c @@ -511,7 +511,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, dh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_deposit_finished, + (GC_JCC) &handle_deposit_finished, dh); return dh; } diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index 2397bf98e..eb81a79fa 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -59,7 +59,6 @@ GNUNET_log (type, "Curl function `%s' has failed at `%s:%d' with error: %s", \ function, __FILE__, __LINE__, curl_easy_strerror (code)); - /** * Stages of initialization for the `struct TALER_EXCHANGE_Handle` */ @@ -1485,7 +1484,7 @@ request_keys (void *cls) kr->job = GNUNET_CURL_job_add (exchange->ctx, eh, GNUNET_NO, - &keys_completed_cb, + (GC_JCC) &keys_completed_cb, kr); exchange->kr = kr; } diff --git a/src/exchange-lib/exchange_api_payback.c b/src/exchange-lib/exchange_api_payback.c index 8eb9b0c16..79eb55838 100644 --- a/src/exchange-lib/exchange_api_payback.c +++ b/src/exchange-lib/exchange_api_payback.c @@ -344,7 +344,7 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange, ph->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_payback_finished, + (GC_JCC) &handle_payback_finished, ph); return ph; } diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c index b1eff1d5a..035d9d6da 100644 --- a/src/exchange-lib/exchange_api_refresh.c +++ b/src/exchange-lib/exchange_api_refresh.c @@ -1218,7 +1218,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, rmh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_refresh_melt_finished, + (GC_JCC) &handle_refresh_melt_finished, rmh); return rmh; } @@ -1645,7 +1645,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, rrh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_refresh_reveal_finished, + (GC_JCC) &handle_refresh_reveal_finished, rrh); return rrh; } diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c index d7ca8165b..f882491ea 100644 --- a/src/exchange-lib/exchange_api_refresh_link.c +++ b/src/exchange-lib/exchange_api_refresh_link.c @@ -415,7 +415,7 @@ TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange, rlh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_refresh_link_finished, + (GC_JCC) &handle_refresh_link_finished, rlh); return rlh; } diff --git a/src/exchange-lib/exchange_api_refund.c b/src/exchange-lib/exchange_api_refund.c index f4b118d7e..80eed74dc 100644 --- a/src/exchange-lib/exchange_api_refund.c +++ b/src/exchange-lib/exchange_api_refund.c @@ -386,7 +386,7 @@ refund_obj = json_pack ("{s:o, s:o," /* amount/fee */ rh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_refund_finished, + (GC_JCC) &handle_refund_finished, rh); return rh; } diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c index 58105e425..1f9a3a36e 100644 --- a/src/exchange-lib/exchange_api_reserve.c +++ b/src/exchange-lib/exchange_api_reserve.c @@ -631,7 +631,7 @@ TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange, rsh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_NO, - &handle_reserve_status_finished, + (GC_JCC) &handle_reserve_status_finished, rsh); return rsh; } @@ -1039,7 +1039,7 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange, wsh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_reserve_withdraw_finished, + (GC_JCC) &handle_reserve_withdraw_finished, wsh); return wsh; } diff --git a/src/exchange-lib/exchange_api_track_transaction.c b/src/exchange-lib/exchange_api_track_transaction.c index 3febf20fb..9027acf52 100644 --- a/src/exchange-lib/exchange_api_track_transaction.c +++ b/src/exchange-lib/exchange_api_track_transaction.c @@ -337,7 +337,7 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange, dwh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_deposit_wtid_finished, + (GC_JCC) &handle_deposit_wtid_finished, dwh); return dwh; } diff --git a/src/exchange-lib/exchange_api_track_transfer.c b/src/exchange-lib/exchange_api_track_transfer.c index 4ec2a50c7..5d46ffa5a 100644 --- a/src/exchange-lib/exchange_api_track_transfer.c +++ b/src/exchange-lib/exchange_api_track_transfer.c @@ -359,7 +359,7 @@ TALER_EXCHANGE_track_transfer (struct TALER_EXCHANGE_Handle *exchange, wdh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_track_transfer_finished, + (GC_JCC) &handle_track_transfer_finished, wdh); return wdh; } diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c index f9ef10cda..ef64a777b 100644 --- a/src/exchange-lib/exchange_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -412,7 +412,7 @@ TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, wh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_YES, - &handle_wire_finished, + (GC_JCC) &handle_wire_finished, wh); return wh; } diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 99a2c375c..3d4b944a6 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -24,6 +24,7 @@ #include #include +#include #include "taler_util.h" #include "taler_error_codes.h" @@ -37,6 +38,11 @@ __FILE__, __LINE__, error.text, error.source) +/** + * A shorter name to make type casts less verbose. + */ +typedef GNUNET_CURL_JobCompletionCallback GC_JCC; + /** * Convert a TALER amount to a JSON object. * -- cgit v1.2.3