fix -Wextra warnings
This commit is contained in:
parent
0f214150db
commit
c5c04cb51f
@ -55,6 +55,9 @@ run (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_AUDITORDB_Plugin *plugin;
|
struct TALER_AUDITORDB_Plugin *plugin;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) args;
|
||||||
|
(void) cfgfile;
|
||||||
if (NULL ==
|
if (NULL ==
|
||||||
(plugin = TALER_AUDITORDB_plugin_load (cfg)))
|
(plugin = TALER_AUDITORDB_plugin_load (cfg)))
|
||||||
{
|
{
|
||||||
|
@ -288,6 +288,9 @@ handle_mhd_completion_callback (void *cls,
|
|||||||
void **con_cls,
|
void **con_cls,
|
||||||
enum MHD_RequestTerminationCode toe)
|
enum MHD_RequestTerminationCode toe)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) connection;
|
||||||
|
(void) toe;
|
||||||
if (NULL == *con_cls)
|
if (NULL == *con_cls)
|
||||||
return;
|
return;
|
||||||
TALER_MHD_parse_post_cleanup_callback (*con_cls);
|
TALER_MHD_parse_post_cleanup_callback (*con_cls);
|
||||||
@ -388,11 +391,12 @@ handle_mhd_request (void *cls,
|
|||||||
{ "/agpl", MHD_HTTP_METHOD_GET, "text/plain",
|
{ "/agpl", MHD_HTTP_METHOD_GET, "text/plain",
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
&TAH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND },
|
&TAH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND },
|
||||||
|
{ NULL, NULL, NULL, NULL, 0, NULL, 0 }
|
||||||
{ NULL, NULL, NULL, NULL, 0, 0 }
|
|
||||||
};
|
};
|
||||||
struct TAH_RequestHandler *rh;
|
struct TAH_RequestHandler *rh;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) version;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Handling request for URL '%s'\n",
|
"Handling request for URL '%s'\n",
|
||||||
url);
|
url);
|
||||||
|
@ -203,6 +203,10 @@ TAH_DEPOSIT_CONFIRMATION_handler (struct TAH_RequestHandler *rh,
|
|||||||
GNUNET_JSON_spec_end ()
|
GNUNET_JSON_spec_end ()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) rh;
|
||||||
|
(void) connection_cls;
|
||||||
|
(void) upload_data;
|
||||||
|
(void) upload_data_size;
|
||||||
res = TALER_MHD_parse_post_json (connection,
|
res = TALER_MHD_parse_post_json (connection,
|
||||||
connection_cls,
|
connection_cls,
|
||||||
upload_data,
|
upload_data,
|
||||||
|
@ -124,6 +124,9 @@ TAH_MHD_handler_send_json_pack_error (struct TAH_RequestHandler *rh,
|
|||||||
const char *upload_data,
|
const char *upload_data,
|
||||||
size_t *upload_data_size)
|
size_t *upload_data_size)
|
||||||
{
|
{
|
||||||
|
(void) connection_cls;
|
||||||
|
(void) upload_data;
|
||||||
|
(void) upload_data_size;
|
||||||
return TALER_MHD_reply_json_pack (connection,
|
return TALER_MHD_reply_json_pack (connection,
|
||||||
rh->response_code,
|
rh->response_code,
|
||||||
"{s:s}",
|
"{s:s}",
|
||||||
|
@ -431,6 +431,7 @@ free_rii (void *cls,
|
|||||||
{
|
{
|
||||||
struct ReserveInInfo *rii = value;
|
struct ReserveInInfo *rii = value;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
GNUNET_CONTAINER_multihashmap_remove (in_map,
|
GNUNET_CONTAINER_multihashmap_remove (in_map,
|
||||||
key,
|
key,
|
||||||
@ -455,6 +456,7 @@ free_roi (void *cls,
|
|||||||
{
|
{
|
||||||
struct ReserveOutInfo *roi = value;
|
struct ReserveOutInfo *roi = value;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
GNUNET_CONTAINER_multihashmap_remove (out_map,
|
GNUNET_CONTAINER_multihashmap_remove (out_map,
|
||||||
key,
|
key,
|
||||||
@ -479,6 +481,7 @@ free_rc (void *cls,
|
|||||||
{
|
{
|
||||||
struct ReserveClosure *rc = value;
|
struct ReserveClosure *rc = value;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
GNUNET_CONTAINER_multihashmap_remove (reserve_closures,
|
GNUNET_CONTAINER_multihashmap_remove (reserve_closures,
|
||||||
key,
|
key,
|
||||||
@ -499,6 +502,7 @@ do_shutdown (void *cls)
|
|||||||
{
|
{
|
||||||
struct WireAccount *wa;
|
struct WireAccount *wa;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
if (NULL != ctx)
|
if (NULL != ctx)
|
||||||
{
|
{
|
||||||
GNUNET_CURL_fini (ctx);
|
GNUNET_CURL_fini (ctx);
|
||||||
@ -699,6 +703,8 @@ check_pending_rc (void *cls,
|
|||||||
{
|
{
|
||||||
struct ReserveClosure *rc = value;
|
struct ReserveClosure *rc = value;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) key;
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
TALER_amount_add (&total_closure_amount_lag,
|
TALER_amount_add (&total_closure_amount_lag,
|
||||||
&total_closure_amount_lag,
|
&total_closure_amount_lag,
|
||||||
@ -905,6 +911,7 @@ wire_missing_cb (void *cls,
|
|||||||
/* bool? */ int tiny,
|
/* bool? */ int tiny,
|
||||||
/* bool? */ int done)
|
/* bool? */ int done)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
TALER_amount_add (&total_amount_lag,
|
TALER_amount_add (&total_amount_lag,
|
||||||
&total_amount_lag,
|
&total_amount_lag,
|
||||||
@ -1251,6 +1258,7 @@ complain_out_not_found (void *cls,
|
|||||||
.found = GNUNET_NO
|
.found = GNUNET_NO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) key;
|
||||||
hash_rc (roi->details.credit_account_url,
|
hash_rc (roi->details.credit_account_url,
|
||||||
&roi->details.wtid,
|
&roi->details.wtid,
|
||||||
&rkey);
|
&rkey);
|
||||||
@ -1355,6 +1363,7 @@ history_debit_cb (void *cls,
|
|||||||
struct WireAccount *wa = cls;
|
struct WireAccount *wa = cls;
|
||||||
struct ReserveOutInfo *roi;
|
struct ReserveOutInfo *roi;
|
||||||
|
|
||||||
|
(void) json;
|
||||||
if (NULL == details)
|
if (NULL == details)
|
||||||
{
|
{
|
||||||
wa->dhh = NULL;
|
wa->dhh = NULL;
|
||||||
@ -1481,7 +1490,7 @@ begin_debit_audit ()
|
|||||||
* processing debits.
|
* processing debits.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
conclude_credit_history ()
|
conclude_credit_history (void)
|
||||||
{
|
{
|
||||||
GNUNET_CONTAINER_multihashmap_destroy (in_map);
|
GNUNET_CONTAINER_multihashmap_destroy (in_map);
|
||||||
in_map = NULL;
|
in_map = NULL;
|
||||||
@ -1575,6 +1584,7 @@ complain_in_not_found (void *cls,
|
|||||||
struct WireAccount *wa = cls;
|
struct WireAccount *wa = cls;
|
||||||
struct ReserveInInfo *rii = value;
|
struct ReserveInInfo *rii = value;
|
||||||
|
|
||||||
|
(void) key;
|
||||||
report (report_reserve_in_inconsistencies,
|
report (report_reserve_in_inconsistencies,
|
||||||
json_pack ("{s:I, s:o, s:o, s:o, s:o, s:s, s:s}",
|
json_pack ("{s:I, s:o, s:o, s:o, s:o, s:s, s:s}",
|
||||||
"row", (json_int_t) rii->rowid,
|
"row", (json_int_t) rii->rowid,
|
||||||
@ -1631,6 +1641,7 @@ history_credit_cb (void *cls,
|
|||||||
struct ReserveInInfo *rii;
|
struct ReserveInInfo *rii;
|
||||||
struct GNUNET_HashCode key;
|
struct GNUNET_HashCode key;
|
||||||
|
|
||||||
|
(void) json;
|
||||||
if (NULL == details)
|
if (NULL == details)
|
||||||
{
|
{
|
||||||
wa->chh = NULL;
|
wa->chh = NULL;
|
||||||
@ -2044,6 +2055,7 @@ process_account_cb (void *cls,
|
|||||||
{
|
{
|
||||||
struct WireAccount *wa;
|
struct WireAccount *wa;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
if ( (GNUNET_NO == ai->debit_enabled) &&
|
if ( (GNUNET_NO == ai->debit_enabled) &&
|
||||||
(GNUNET_NO == ai->credit_enabled) )
|
(GNUNET_NO == ai->credit_enabled) )
|
||||||
return; /* not an active exchange account */
|
return; /* not an active exchange account */
|
||||||
@ -2092,6 +2104,9 @@ run (void *cls,
|
|||||||
static const struct TALER_MasterPublicKeyP zeromp;
|
static const struct TALER_MasterPublicKeyP zeromp;
|
||||||
char *tinys;
|
char *tinys;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) args;
|
||||||
|
(void) cfgfile;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Launching auditor\n");
|
"Launching auditor\n");
|
||||||
start_time = GNUNET_TIME_absolute_get ();
|
start_time = GNUNET_TIME_absolute_get ();
|
||||||
|
@ -1289,9 +1289,7 @@ TALER_EXCHANGE_reserve_withdraw_cancel (struct
|
|||||||
* to #TALER_EXCHANGE_refresh_melt() that will generate the request.
|
* to #TALER_EXCHANGE_refresh_melt() that will generate the request.
|
||||||
*
|
*
|
||||||
* This function does verify that the given request data is internally
|
* This function does verify that the given request data is internally
|
||||||
* consistent. However, the @a melts_sig is only verified if @a
|
* consistent. However, the @a melts_sigs are NOT verified.
|
||||||
* check_sig is set to #GNUNET_YES, as this may be relatively
|
|
||||||
* expensive and should be redundant.
|
|
||||||
*
|
*
|
||||||
* Aside from some non-trivial cryptographic operations that might
|
* Aside from some non-trivial cryptographic operations that might
|
||||||
* take a bit of CPU time to complete, this function returns
|
* take a bit of CPU time to complete, this function returns
|
||||||
@ -1307,7 +1305,6 @@ TALER_EXCHANGE_reserve_withdraw_cancel (struct
|
|||||||
* @param melt_pk denomination key information
|
* @param melt_pk denomination key information
|
||||||
* record corresponding to the @a melt_sig
|
* record corresponding to the @a melt_sig
|
||||||
* validity of the keys
|
* validity of the keys
|
||||||
* @param check_sig verify the validity of the signatures of @a melt_sig
|
|
||||||
* @param fresh_pks_len length of the @a pks array
|
* @param fresh_pks_len length of the @a pks array
|
||||||
* @param fresh_pks array of @a pks_len denominations of fresh coins to create
|
* @param fresh_pks array of @a pks_len denominations of fresh coins to create
|
||||||
* @param[out] res_size set to the size of the return value, or 0 on error
|
* @param[out] res_size set to the size of the return value, or 0 on error
|
||||||
@ -1325,7 +1322,6 @@ TALER_EXCHANGE_refresh_prepare (const struct
|
|||||||
TALER_DenominationSignature *melt_sig,
|
TALER_DenominationSignature *melt_sig,
|
||||||
const struct
|
const struct
|
||||||
TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
||||||
int check_sig,
|
|
||||||
unsigned int fresh_pks_len,
|
unsigned int fresh_pks_len,
|
||||||
const struct
|
const struct
|
||||||
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
||||||
|
@ -195,14 +195,12 @@ free_version_info (struct TALER_AUDITOR_VersionInformation *vi)
|
|||||||
* in the @a key_data.
|
* in the @a key_data.
|
||||||
*
|
*
|
||||||
* @param[in] resp_obj JSON object to parse
|
* @param[in] resp_obj JSON object to parse
|
||||||
* @param check_sig #GNUNET_YES if we should check the signature
|
|
||||||
* @param[out] vi where to store the results we decoded
|
* @param[out] vi where to store the results we decoded
|
||||||
* @param[out] vc where to store version compatibility data
|
* @param[out] vc where to store version compatibility data
|
||||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error (malformed JSON)
|
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error (malformed JSON)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
decode_version_json (const json_t *resp_obj,
|
decode_version_json (const json_t *resp_obj,
|
||||||
int check_sig,
|
|
||||||
struct TALER_AUDITOR_VersionInformation *vi,
|
struct TALER_AUDITOR_VersionInformation *vi,
|
||||||
enum TALER_AUDITOR_VersionCompatibility *vc)
|
enum TALER_AUDITOR_VersionCompatibility *vc)
|
||||||
{
|
{
|
||||||
@ -313,7 +311,6 @@ version_completed_cb (void *cls,
|
|||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
decode_version_json (resp_obj,
|
decode_version_json (resp_obj,
|
||||||
GNUNET_YES,
|
|
||||||
&auditor->vi,
|
&auditor->vi,
|
||||||
&vc))
|
&vc))
|
||||||
{
|
{
|
||||||
|
@ -278,6 +278,7 @@ TEAH_acc_confirmation_cb (void *cls,
|
|||||||
struct TEAH_AuditorInteractionEntry *aie = cls;
|
struct TEAH_AuditorInteractionEntry *aie = cls;
|
||||||
struct TEAH_AuditorListEntry *ale = aie->ale;
|
struct TEAH_AuditorListEntry *ale = aie->ale;
|
||||||
|
|
||||||
|
(void) json;
|
||||||
if (MHD_HTTP_OK != http_status)
|
if (MHD_HTTP_OK != http_status)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
|
@ -657,9 +657,7 @@ deserialize_melt_data (const char *buf,
|
|||||||
* to #TALER_EXCHANGE_refresh_melt() that will generate the request.
|
* to #TALER_EXCHANGE_refresh_melt() that will generate the request.
|
||||||
*
|
*
|
||||||
* This function does verify that the given request data is internally
|
* This function does verify that the given request data is internally
|
||||||
* consistent. However, the @a melts_sigs are only verified if
|
* consistent. However, the @a melts_sigs are NOT verified.
|
||||||
* @a check_sigs is set to #GNUNET_YES, as this may be relatively
|
|
||||||
* expensive and should be redundant.
|
|
||||||
*
|
*
|
||||||
* Aside from some non-trivial cryptographic operations that might
|
* Aside from some non-trivial cryptographic operations that might
|
||||||
* take a bit of CPU time to complete, this function returns
|
* take a bit of CPU time to complete, this function returns
|
||||||
@ -675,7 +673,6 @@ deserialize_melt_data (const char *buf,
|
|||||||
* @param melt_pk denomination key information
|
* @param melt_pk denomination key information
|
||||||
* record corresponding to the @a melt_sig
|
* record corresponding to the @a melt_sig
|
||||||
* validity of the keys
|
* validity of the keys
|
||||||
* @param check_sig verify the validity of the @a melt_sig signature
|
|
||||||
* @param fresh_pks_len length of the @a pks array
|
* @param fresh_pks_len length of the @a pks array
|
||||||
* @param fresh_pks array of @a pks_len denominations of fresh coins to create
|
* @param fresh_pks array of @a pks_len denominations of fresh coins to create
|
||||||
* @param[out] res_size set to the size of the return value, or 0 on error
|
* @param[out] res_size set to the size of the return value, or 0 on error
|
||||||
@ -693,7 +690,6 @@ TALER_EXCHANGE_refresh_prepare (const struct
|
|||||||
TALER_DenominationSignature *melt_sig,
|
TALER_DenominationSignature *melt_sig,
|
||||||
const struct
|
const struct
|
||||||
TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
||||||
int check_sig,
|
|
||||||
unsigned int fresh_pks_len,
|
unsigned int fresh_pks_len,
|
||||||
const struct
|
const struct
|
||||||
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
||||||
|
@ -989,14 +989,17 @@ refresh_melt_run (void *cls,
|
|||||||
&fresh_pk->fee_withdraw));
|
&fresh_pk->fee_withdraw));
|
||||||
rms->fresh_pks[i] = *fresh_pk;
|
rms->fresh_pks[i] = *fresh_pk;
|
||||||
/* Make a deep copy of the RSA key */
|
/* Make a deep copy of the RSA key */
|
||||||
rms->fresh_pks[i].key.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (
|
rms->fresh_pks[i].key.rsa_public_key
|
||||||
fresh_pk->key.rsa_public_key);
|
= GNUNET_CRYPTO_rsa_public_key_dup (fresh_pk->key.rsa_public_key);
|
||||||
}
|
}
|
||||||
rms->refresh_data = TALER_EXCHANGE_refresh_prepare
|
rms->refresh_data
|
||||||
(rms->melt_priv, &melt_amount, melt_sig,
|
= TALER_EXCHANGE_refresh_prepare (rms->melt_priv,
|
||||||
melt_denom_pub,
|
&melt_amount,
|
||||||
GNUNET_YES, num_fresh_coins, rms->fresh_pks,
|
melt_sig,
|
||||||
&rms->refresh_data_length);
|
melt_denom_pub,
|
||||||
|
num_fresh_coins,
|
||||||
|
rms->fresh_pks,
|
||||||
|
&rms->refresh_data_length);
|
||||||
|
|
||||||
if (NULL == rms->refresh_data)
|
if (NULL == rms->refresh_data)
|
||||||
{
|
{
|
||||||
@ -1004,9 +1007,11 @@ refresh_melt_run (void *cls,
|
|||||||
TALER_TESTING_interpreter_fail (rms->is);
|
TALER_TESTING_interpreter_fail (rms->is);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rms->rmh = TALER_EXCHANGE_refresh_melt
|
rms->rmh = TALER_EXCHANGE_refresh_melt (is->exchange,
|
||||||
(is->exchange, rms->refresh_data_length,
|
rms->refresh_data_length,
|
||||||
rms->refresh_data, &melt_cb, rms);
|
rms->refresh_data,
|
||||||
|
&melt_cb,
|
||||||
|
rms);
|
||||||
|
|
||||||
if (NULL == rms->rmh)
|
if (NULL == rms->rmh)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user