diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-01-18 19:16:33 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-01-18 19:16:44 +0100 |
commit | 8dbc19758b87c41ada780c20edac0c500ab2daa1 (patch) | |
tree | 88f24a9f5d304a1b3a5c9ab6509395bb38af3cfb /src/lib | |
parent | d53eca894011f31b698a13cf41d31e2d19c7e427 (diff) | |
download | exchange-8dbc19758b87c41ada780c20edac0c500ab2daa1.tar.xz |
fix compiler warnings
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_common.c | 1 | ||||
-rw-r--r-- | src/lib/exchange_api_handle.c | 4 | ||||
-rw-r--r-- | src/lib/exchange_api_payback.c | 1 | ||||
-rw-r--r-- | src/lib/exchange_api_refresh_link.c | 9 | ||||
-rw-r--r-- | src/lib/testing_api_cmd_withdraw.c | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c index 792477af9..556ca2049 100644 --- a/src/lib/exchange_api_common.c +++ b/src/lib/exchange_api_common.c @@ -322,6 +322,7 @@ TALER_EXCHANGE_verify_coin_history (const struct { /* signature not supported, new version on server? */ GNUNET_break_op (0); + GNUNET_assert (GNUNET_SYSERR == add); return GNUNET_SYSERR; } if (GNUNET_YES == add) diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index ed05558f0..94719f99a 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -578,7 +578,6 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, auditor->denom_keys = GNUNET_new_array (len, struct TALER_EXCHANGE_AuditorDenominationInfo); - i = 0; off = 0; json_array_foreach (keys, i, key) { struct TALER_AuditorSignatureP auditor_sig; @@ -911,7 +910,6 @@ decode_keys_json (const json_t *resp_obj, key_data->sign_keys = GNUNET_new_array (key_data->num_sign_keys, struct TALER_EXCHANGE_SigningPublicKey); - index = 0; json_array_foreach (sign_keys_array, index, sign_key_obj) { EXITIF (GNUNET_SYSERR == parse_json_signkey (&key_data->sign_keys[index], @@ -933,7 +931,6 @@ decode_keys_json (const json_t *resp_obj, "denoms"))); EXITIF (JSON_ARRAY != json_typeof (denom_keys_array)); - index = 0; json_array_foreach (denom_keys_array, index, denom_key_obj) { struct TALER_EXCHANGE_DenomPublicKey dk; int found = GNUNET_NO; @@ -992,7 +989,6 @@ decode_keys_json (const json_t *resp_obj, EXITIF (JSON_ARRAY != json_typeof (auditors_array)); /* Merge with the existing auditor information we have (/keys cherry picking) */ - index = 0; json_array_foreach (auditors_array, index, auditor_info) { struct TALER_EXCHANGE_AuditorInformation ai; int found = GNUNET_NO; diff --git a/src/lib/exchange_api_payback.c b/src/lib/exchange_api_payback.c index b28dc1376..c20208055 100644 --- a/src/lib/exchange_api_payback.c +++ b/src/lib/exchange_api_payback.c @@ -219,6 +219,7 @@ handle_payback_finished (void *cls, { GNUNET_break_op (0); response_code = 0; + break; } TALER_EXCHANGE_payback_cancel (ph); return; diff --git a/src/lib/exchange_api_refresh_link.c b/src/lib/exchange_api_refresh_link.c index 1a2fc719c..6a747d1b6 100644 --- a/src/lib/exchange_api_refresh_link.c +++ b/src/lib/exchange_api_refresh_link.c @@ -203,7 +203,8 @@ parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh, loop once for 'session=0' in most cases. num_coins tracks the size of the 1d array we return, - whilst 'i' and 'session' track the 2d array. */for (session = 0; session<json_array_size (json); session++) + whilst 'i' and 'session' track the 2d array. */// + for (session = 0; session<json_array_size (json); session++) { json_t *jsona; struct GNUNET_JSON_Specification spec[] = { @@ -236,9 +237,9 @@ parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh, { unsigned int off_coin; /* index into 1d array */ unsigned int i; - struct TALER_CoinSpendPrivateKeyP coin_privs[num_coins]; - struct TALER_DenominationSignature sigs[num_coins]; - struct TALER_DenominationPublicKey pubs[num_coins]; + struct TALER_CoinSpendPrivateKeyP coin_privs[GNUNET_NZL (num_coins)]; + struct TALER_DenominationSignature sigs[GNUNET_NZL (num_coins)]; + struct TALER_DenominationPublicKey pubs[GNUNET_NZL (num_coins)]; memset (sigs, 0, sizeof (sigs)); memset (pubs, 0, sizeof (pubs)); diff --git a/src/lib/testing_api_cmd_withdraw.c b/src/lib/testing_api_cmd_withdraw.c index b6d8b32ab..6494645ab 100644 --- a/src/lib/testing_api_cmd_withdraw.c +++ b/src/lib/testing_api_cmd_withdraw.c @@ -275,7 +275,7 @@ withdraw_run (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to determine denomination key at %s\n", - cmd->label); + (NULL != cmd) ? cmd->label : "<retried command>"); GNUNET_assert (0); } else |