-fix misc. compiler warnings

This commit is contained in:
Christian Grothoff 2021-11-19 10:57:27 +01:00
parent dff5510dd3
commit bdaaa0f6cb
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
37 changed files with 118 additions and 204 deletions

View File

@ -410,6 +410,9 @@ run (void *cls,
enum TALER_MHD_GlobalOptions go; enum TALER_MHD_GlobalOptions go;
int fh; int fh;
(void) cls;
(void) args;
(void) cfgfile;
go = TALER_MHD_GO_NONE; go = TALER_MHD_GO_NONE;
if (auditor_connection_close) if (auditor_connection_close)
go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE; go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;

View File

@ -310,6 +310,7 @@ do_sync (void *cls)
{ {
static struct GNUNET_TIME_Relative delay; static struct GNUNET_TIME_Relative delay;
(void) cls;
sync_task = NULL; sync_task = NULL;
actual_size = 0; actual_size = 0;
if (GNUNET_SYSERR == if (GNUNET_SYSERR ==
@ -469,6 +470,7 @@ load_config (const char *cfgfile)
static void static void
do_shutdown (void *cls) do_shutdown (void *cls)
{ {
(void) cls;
if (NULL != sync_task) if (NULL != sync_task)
{ {
GNUNET_SCHEDULER_cancel (sync_task); GNUNET_SCHEDULER_cancel (sync_task);

View File

@ -1575,6 +1575,7 @@ deposit_cb (void *cls,
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
(void) done; (void) done;
(void) exchange_timestamp;
GNUNET_assert (rowid >= ppc.last_deposit_serial_id); /* should be monotonically increasing */ GNUNET_assert (rowid >= ppc.last_deposit_serial_id); /* should be monotonically increasing */
ppc.last_deposit_serial_id = rowid + 1; ppc.last_deposit_serial_id = rowid + 1;
@ -2206,6 +2207,8 @@ check_denomination (
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
struct TALER_AuditorSignatureP auditor_sig; struct TALER_AuditorSignatureP auditor_sig;
(void) cls;
(void) denom_pub;
qs = TALER_ARL_edb->select_auditor_denom_sig (TALER_ARL_edb->cls, qs = TALER_ARL_edb->select_auditor_denom_sig (TALER_ARL_edb->cls,
&issue->denom_hash, &issue->denom_hash,
&TALER_ARL_auditor_pub, &TALER_ARL_auditor_pub,

View File

@ -1181,6 +1181,8 @@ free_account (void *cls,
{ {
struct Account *account = val; struct Account *account = val;
(void) cls;
(void) key;
GNUNET_assert (NULL == account->lp_head); GNUNET_assert (NULL == account->lp_head);
GNUNET_free (account->account_name); GNUNET_free (account->account_name);
GNUNET_free (account); GNUNET_free (account);

View File

@ -547,6 +547,7 @@ do_upload (char *const *args)
{ {
char *exchange_url; char *exchange_url;
(void) args;
if (GNUNET_YES == GNUNET_is_zero (&auditor_pub)) if (GNUNET_YES == GNUNET_is_zero (&auditor_pub))
{ {
/* private key not available, try configuration for public key */ /* private key not available, try configuration for public key */
@ -657,6 +658,8 @@ keys_cb (
{ {
char *const *args = cls; char *const *args = cls;
(void) keys;
(void) compat;
switch (hr->http_status) switch (hr->http_status)
{ {
case MHD_HTTP_OK: case MHD_HTTP_OK:
@ -1375,6 +1378,8 @@ run (void *cls,
const char *cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg) const struct GNUNET_CONFIGURATION_Handle *cfg)
{ {
(void) cls;
(void) cfgfile;
kcfg = cfg; kcfg = cfg;
if (GNUNET_OK != if (GNUNET_OK !=
TALER_config_get_currency (kcfg, TALER_config_get_currency (kcfg,

View File

@ -1759,6 +1759,7 @@ trigger_upload (const char *exchange_url)
static void static void
do_upload (char *const *args) do_upload (char *const *args)
{ {
(void) args;
if (NULL != in) if (NULL != in)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@ -2264,6 +2265,7 @@ download_cb (void *cls,
{ {
char *const *args = cls; char *const *args = cls;
(void) keys;
mgkh = NULL; mgkh = NULL;
switch (hr->http_status) switch (hr->http_status)
{ {
@ -3443,6 +3445,8 @@ run (void *cls,
const char *cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg) const struct GNUNET_CONFIGURATION_Handle *cfg)
{ {
(void) cls;
(void) cfgfile;
kcfg = cfg; kcfg = cfg;
if (GNUNET_OK != if (GNUNET_OK !=
TALER_config_get_currency (kcfg, TALER_config_get_currency (kcfg,

View File

@ -467,6 +467,7 @@ handler_seed (struct TEH_RequestContext *rc,
MHD_RESULT ret; MHD_RESULT ret;
struct MHD_Response *resp; struct MHD_Response *resp;
(void) args;
body = malloc (SEED_SIZE); /* must use malloc(), because MHD will use free() */ body = malloc (SEED_SIZE); /* must use malloc(), because MHD will use free() */
if (NULL == body) if (NULL == body)
return MHD_NO; return MHD_NO;
@ -1712,6 +1713,9 @@ run (void *cls,
enum TALER_MHD_GlobalOptions go; enum TALER_MHD_GlobalOptions go;
int fh; int fh;
(void) cls;
(void) args;
(void ) cfgfile;
go = TALER_MHD_GO_NONE; go = TALER_MHD_GO_NONE;
if (connection_close) if (connection_close)
go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE; go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;

View File

@ -182,7 +182,7 @@ TEH_DB_run_transaction (struct MHD_Connection *connection,
} }
/* make sure callback did not violate invariants! */ /* make sure callback did not violate invariants! */
GNUNET_assert ( (NULL == mhd_ret) || GNUNET_assert ( (NULL == mhd_ret) ||
(-1 == *mhd_ret) ); (-1 == (int) *mhd_ret) );
if (0 <= qs) if (0 <= qs)
return GNUNET_OK; return GNUNET_OK;
} }

View File

@ -1238,6 +1238,7 @@ add_sign_key_cb (void *cls,
struct SignKeyCtx *ctx = cls; struct SignKeyCtx *ctx = cls;
struct SigningKey *sk = value; struct SigningKey *sk = value;
(void) pid;
ctx->next_sk_expire = ctx->next_sk_expire =
GNUNET_TIME_absolute_min (ctx->next_sk_expire, GNUNET_TIME_absolute_min (ctx->next_sk_expire,
sk->meta.expire_sign); sk->meta.expire_sign);
@ -2575,6 +2576,7 @@ TEH_keys_management_get_keys_handler (const struct TEH_RequestHandler *rh,
struct TEH_KeyStateHandle *ksh; struct TEH_KeyStateHandle *ksh;
json_t *reply; json_t *reply;
(void) rh;
ksh = get_key_state (true); ksh = get_key_state (true);
if (NULL == ksh) if (NULL == ksh)
{ {

View File

@ -109,6 +109,7 @@ TEH_handler_kyc_wallet (
.purpose = htonl (TALER_SIGNATURE_WALLET_ACCOUNT_SETUP) .purpose = htonl (TALER_SIGNATURE_WALLET_ACCOUNT_SETUP)
}; };
(void) args;
ret = TALER_MHD_parse_json_data (rc->connection, ret = TALER_MHD_parse_json_data (rc->connection,
root, root,
spec); spec);

View File

@ -627,6 +627,17 @@ char *
TALER_JSON_wire_to_payto (const json_t *wire_s); TALER_JSON_wire_to_payto (const json_t *wire_s);
/**
* Hash @a extensions.
*
* @param extensions contract extensions to hash
* @param[out] ech where to write the extension hash
*/
void
TALER_deposit_extension_hash (const json_t *extensions,
struct TALER_ExtensionContractHash *ech);
#endif /* TALER_JSON_LIB_H_ */ #endif /* TALER_JSON_LIB_H_ */
/* End of taler_json_lib.h */ /* End of taler_json_lib.h */

View File

@ -837,4 +837,15 @@ TALER_JSON_get_error_code2 (const void *data,
} }
void
TALER_deposit_extension_hash (const json_t *extensions,
struct TALER_ExtensionContractHash *ech)
{
GNUNET_assert (GNUNET_OK ==
dump_and_hash (extensions,
"taler-contract-extensions",
&ech->hash));
}
/* End of json/json.c */ /* End of json/json.c */

View File

@ -232,6 +232,7 @@ parse_abs_time (void *cls,
json_t *json_t_ms; json_t *json_t_ms;
unsigned long long int tval; unsigned long long int tval;
(void) cls;
if (! json_is_object (root)) if (! json_is_object (root))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
@ -313,6 +314,7 @@ parse_abs_time_nbo (void *cls,
struct GNUNET_TIME_Absolute a; struct GNUNET_TIME_Absolute a;
struct GNUNET_JSON_Specification ispec; struct GNUNET_JSON_Specification ispec;
(void) cls;
ispec = *spec; ispec = *spec;
ispec.parser = &parse_abs_time; ispec.parser = &parse_abs_time;
ispec.ptr = &a; ispec.ptr = &a;
@ -364,6 +366,7 @@ parse_rel_time (void *cls,
json_t *json_d_ms; json_t *json_d_ms;
unsigned long long int tval; unsigned long long int tval;
(void) cls;
if (! json_is_object (root)) if (! json_is_object (root))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
@ -450,6 +453,7 @@ parse_denom_pub (void *cls,
const char *emsg; const char *emsg;
unsigned int eline; unsigned int eline;
(void) cls;
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_JSON_parse (root, GNUNET_JSON_parse (root,
dspec, dspec,
@ -501,6 +505,7 @@ clean_denom_pub (void *cls,
{ {
struct TALER_DenominationPublicKey *denom_pub = spec->ptr; struct TALER_DenominationPublicKey *denom_pub = spec->ptr;
(void) cls;
TALER_denom_pub_free (denom_pub); TALER_denom_pub_free (denom_pub);
} }
@ -543,6 +548,7 @@ parse_denom_sig (void *cls,
const char *emsg; const char *emsg;
unsigned int eline; unsigned int eline;
(void) cls;
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_JSON_parse (root, GNUNET_JSON_parse (root,
dspec, dspec,
@ -594,6 +600,7 @@ clean_denom_sig (void *cls,
{ {
struct TALER_DenominationSignature *denom_sig = spec->ptr; struct TALER_DenominationSignature *denom_sig = spec->ptr;
(void) cls;
TALER_denom_sig_free (denom_sig); TALER_denom_sig_free (denom_sig);
} }
@ -636,6 +643,7 @@ parse_blinded_denom_sig (void *cls,
const char *emsg; const char *emsg;
unsigned int eline; unsigned int eline;
(void) cls;
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_JSON_parse (root, GNUNET_JSON_parse (root,
dspec, dspec,
@ -687,6 +695,7 @@ clean_blinded_denom_sig (void *cls,
{ {
struct TALER_BlindedDenominationSignature *denom_sig = spec->ptr; struct TALER_BlindedDenominationSignature *denom_sig = spec->ptr;
(void) cls;
TALER_blinded_denom_sig_free (denom_sig); TALER_blinded_denom_sig_free (denom_sig);
} }
@ -802,6 +811,7 @@ i18n_cleaner (void *cls,
{ {
struct I18nContext *ctx = cls; struct I18nContext *ctx = cls;
(void) spec;
GNUNET_free (ctx->lp); GNUNET_free (ctx->lp);
GNUNET_free (ctx); GNUNET_free (ctx);
} }

View File

@ -476,6 +476,7 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
const struct TALER_Amount *amount, const struct TALER_Amount *amount,
const struct TALER_MerchantWireHash *h_wire, const struct TALER_MerchantWireHash *h_wire,
const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_PrivateContractHash *h_contract_terms,
const struct TALER_ExtensionContractHash *ech,
const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_DenominationSignature *denom_sig, const struct TALER_DenominationSignature *denom_sig,
const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_DenominationPublicKey *denom_pub,
@ -490,7 +491,7 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
&dki->fee_deposit, &dki->fee_deposit,
h_wire, h_wire,
h_contract_terms, h_contract_terms,
NULL /* FIXME: h_extensions! */, ech,
denom_pub_hash, denom_pub_hash,
timestamp, timestamp,
merchant_pub, merchant_pub,
@ -513,7 +514,7 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
.coin_pub = *coin_pub, .coin_pub = *coin_pub,
.denom_pub_hash = *denom_pub_hash, .denom_pub_hash = *denom_pub_hash,
.denom_sig = *denom_sig, .denom_sig = *denom_sig,
.age_commitment_hash = NULL /* FIXME-Oec */ .age_commitment_hash = { 0 } /* FIXME-Oec */
}; };
if (GNUNET_YES != if (GNUNET_YES !=
@ -567,8 +568,12 @@ TALER_EXCHANGE_deposit (
struct TALER_MerchantWireHash h_wire; struct TALER_MerchantWireHash h_wire;
struct TALER_DenominationHash denom_pub_hash; struct TALER_DenominationHash denom_pub_hash;
struct TALER_Amount amount_without_fee; struct TALER_Amount amount_without_fee;
struct TALER_ExtensionContractHash ech;
char arg_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2 + 32]; char arg_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2 + 32];
if (NULL != extension_details)
TALER_deposit_extension_hash (extension_details,
&ech);
{ {
char pub_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2]; char pub_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2];
char *end; char *end;
@ -623,6 +628,9 @@ TALER_EXCHANGE_deposit (
amount, amount,
&h_wire, &h_wire,
h_contract_terms, h_contract_terms,
(NULL != extension_details)
? &ech
: NULL,
coin_pub, coin_pub,
denom_sig, denom_sig,
denom_pub, denom_pub,

View File

@ -535,6 +535,7 @@ auditor_version_cb (
{ {
struct TEAH_AuditorListEntry *ale = cls; struct TEAH_AuditorListEntry *ale = cls;
(void) hr;
if (NULL == vi) if (NULL == vi)
{ {
/* In this case, we don't mark the auditor as 'up' */ /* In this case, we don't mark the auditor as 'up' */

View File

@ -89,6 +89,8 @@ handle_kyc_proof_finished (void *cls,
.http_status = (unsigned int) response_code .http_status = (unsigned int) response_code
}; };
(void) body;
(void) body_size;
kph->job = NULL; kph->job = NULL;
switch (response_code) switch (response_code)
{ {

View File

@ -61,6 +61,7 @@ prepare_daemon (void);
static void static void
run_daemon (void *cls) run_daemon (void *cls)
{ {
(void) cls;
mhd_task = NULL; mhd_task = NULL;
do { do {
triggered = false; triggered = false;

View File

@ -181,6 +181,7 @@ qconv_denom_pub (void *cls,
void *tbuf; void *tbuf;
(void) cls; (void) cls;
(void) data_len;
GNUNET_assert (1 == param_length); GNUNET_assert (1 == param_length);
GNUNET_assert (scratch_length > 0); GNUNET_assert (scratch_length > 0);
GNUNET_break (NULL == cls); GNUNET_break (NULL == cls);
@ -270,6 +271,7 @@ qconv_denom_sig (void *cls,
void *tbuf; void *tbuf;
(void) cls; (void) cls;
(void) data_len;
GNUNET_assert (1 == param_length); GNUNET_assert (1 == param_length);
GNUNET_assert (scratch_length > 0); GNUNET_assert (scratch_length > 0);
GNUNET_break (NULL == cls); GNUNET_break (NULL == cls);
@ -359,6 +361,7 @@ qconv_blinded_denom_sig (void *cls,
void *tbuf; void *tbuf;
(void) cls; (void) cls;
(void) data_len;
GNUNET_assert (1 == param_length); GNUNET_assert (1 == param_length);
GNUNET_assert (scratch_length > 0); GNUNET_assert (scratch_length > 0);
GNUNET_break (NULL == cls); GNUNET_break (NULL == cls);

View File

@ -520,6 +520,7 @@ extract_denom_pub (void *cls,
uint32_t be[2]; uint32_t be[2];
(void) cls; (void) cls;
(void) dst_size;
fnum = PQfnumber (result, fnum = PQfnumber (result,
fname); fname);
if (fnum < 0) if (fnum < 0)
@ -633,6 +634,7 @@ extract_denom_sig (void *cls,
uint32_t be[2]; uint32_t be[2];
(void) cls; (void) cls;
(void) dst_size;
fnum = PQfnumber (result, fnum = PQfnumber (result,
fname); fname);
if (fnum < 0) if (fnum < 0)
@ -750,6 +752,7 @@ extract_blinded_denom_sig (void *cls,
uint32_t be[2]; uint32_t be[2];
(void) cls; (void) cls;
(void) dst_size;
fnum = PQfnumber (result, fnum = PQfnumber (result,
fname); fname);
if (fnum < 0) if (fnum < 0)

View File

@ -97,6 +97,7 @@ qconv_amount_nbo (void *cls,
struct TALER_Amount amount_hbo; struct TALER_Amount amount_hbo;
(void) cls; (void) cls;
(void) data_len;
TALER_amount_ntoh (&amount_hbo, TALER_amount_ntoh (&amount_hbo,
amount); amount);
return qconv_amount (cls, return qconv_amount (cls,

View File

@ -113,11 +113,15 @@ extract_amount_nbo (void *cls,
struct TALER_AmountNBO *amount = dst; struct TALER_AmountNBO *amount = dst;
struct TALER_Amount amount_hbo; struct TALER_Amount amount_hbo;
size_t amount_hbo_size = sizeof (struct TALER_Amount); size_t amount_hbo_size = sizeof (struct TALER_Amount);
if (GNUNET_YES != extract_amount (cls,
result, (void) cls;
column, (void) dst_size;
&amount_hbo_size, if (GNUNET_YES !=
&amount_hbo)) extract_amount (cls,
result,
column,
&amount_hbo_size,
&amount_hbo))
{ {
GNUNET_break (0); GNUNET_break (0);
return GNUNET_SYSERR; return GNUNET_SYSERR;

View File

@ -168,26 +168,6 @@ auditor_add_cleanup (void *cls,
} }
/**
* Offer internal data from a "auditor_add" CMD, to other commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the object to offer.
*
* @return #GNUNET_OK on success.
*/
static int
auditor_add_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
return GNUNET_NO;
}
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_auditor_add (const char *label, TALER_TESTING_cmd_auditor_add (const char *label,
unsigned int expected_http_status, unsigned int expected_http_status,
@ -203,8 +183,7 @@ TALER_TESTING_cmd_auditor_add (const char *label,
.cls = ds, .cls = ds,
.label = label, .label = label,
.run = &auditor_add_run, .run = &auditor_add_run,
.cleanup = &auditor_add_cleanup, .cleanup = &auditor_add_cleanup
.traits = &auditor_add_traits
}; };
return cmd; return cmd;

View File

@ -165,26 +165,6 @@ auditor_del_cleanup (void *cls,
} }
/**
* Offer internal data from a "auditor_del" CMD, to other commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the object to offer.
*
* @return #GNUNET_OK on success.
*/
static int
auditor_del_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
return GNUNET_NO;
}
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_auditor_del (const char *label, TALER_TESTING_cmd_auditor_del (const char *label,
unsigned int expected_http_status, unsigned int expected_http_status,
@ -200,8 +180,7 @@ TALER_TESTING_cmd_auditor_del (const char *label,
.cls = ds, .cls = ds,
.label = label, .label = label,
.run = &auditor_del_run, .run = &auditor_del_run,
.cleanup = &auditor_del_cleanup, .cleanup = &auditor_del_cleanup
.traits = &auditor_del_traits
}; };
return cmd; return cmd;

View File

@ -40,30 +40,6 @@ struct AuthchangeState
}; };
/**
* No traits to offer, just provide a stub to be called when
* some CMDs iterates through the list of all the commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the trait to return.
* @return #GNUNET_OK on success.
*/
static int
authchange_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
(void) cls;
(void) ret;
(void) trait;
(void) index;
return GNUNET_NO;
}
/** /**
* Run the command. * Run the command.
* *
@ -78,6 +54,7 @@ authchange_run (void *cls,
{ {
struct AuthchangeState *ss = cls; struct AuthchangeState *ss = cls;
(void) cmd;
if (NULL != is->ctx) if (NULL != is->ctx)
{ {
GNUNET_CURL_fini (is->ctx); GNUNET_CURL_fini (is->ctx);
@ -142,8 +119,7 @@ TALER_TESTING_cmd_set_authorization (const char *label,
.cls = ss, .cls = ss,
.label = label, .label = label,
.run = &authchange_run, .run = &authchange_run,
.cleanup = &authchange_cleanup, .cleanup = &authchange_cleanup
.traits = &authchange_traits
}; };
return cmd; return cmd;

View File

@ -60,6 +60,7 @@ transfer_run (void *cls,
{ {
struct TransferState *as = cls; struct TransferState *as = cls;
(void) cmd;
as->transfer_proc as->transfer_proc
= GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL, NULL, NULL, NULL, NULL,
@ -94,6 +95,7 @@ transfer_cleanup (void *cls,
{ {
struct TransferState *as = cls; struct TransferState *as = cls;
(void) cmd;
if (NULL != as->transfer_proc) if (NULL != as->transfer_proc)
{ {
GNUNET_break (0 == GNUNET_break (0 ==

View File

@ -61,6 +61,7 @@ wirewatch_run (void *cls,
{ {
struct WirewatchState *ws = cls; struct WirewatchState *ws = cls;
(void) cmd;
ws->wirewatch_proc ws->wirewatch_proc
= GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL, NULL, NULL, NULL, NULL,
@ -94,6 +95,7 @@ wirewatch_cleanup (void *cls,
{ {
struct WirewatchState *ws = cls; struct WirewatchState *ws = cls;
(void) cmd;
if (NULL != ws->wirewatch_proc) if (NULL != ws->wirewatch_proc)
{ {
GNUNET_break (0 == GNUNET_break (0 ==

View File

@ -139,6 +139,7 @@ insert_deposit_run (void *cls,
struct TALER_DenominationPublicKey dpk; struct TALER_DenominationPublicKey dpk;
struct TALER_DenominationPrivateKey denom_priv; struct TALER_DenominationPrivateKey denom_priv;
(void) cmd;
// prepare and store issue first. // prepare and store issue first.
fake_issue (&issue); fake_issue (&issue);
GNUNET_assert (GNUNET_OK == GNUNET_assert (GNUNET_OK ==
@ -283,6 +284,7 @@ insert_deposit_cleanup (void *cls,
{ {
struct InsertDepositState *ids = cls; struct InsertDepositState *ids = cls;
(void) cmd;
GNUNET_free (ids); GNUNET_free (ids);
} }

View File

@ -92,6 +92,11 @@ handle_post (void *cls,
{ {
struct RequestCtx *rc = cls; struct RequestCtx *rc = cls;
(void) kind;
(void) filename;
(void) content_type;
(void) transfer_encoding;
(void) off;
if (0 == strcmp (key, if (0 == strcmp (key,
"code")) "code"))
append (&rc->code, append (&rc->code,
@ -169,6 +174,8 @@ handler_cb (void *cls,
unsigned int hc; unsigned int hc;
json_t *body; json_t *body;
(void) cls;
(void) version;
if (0 == strcasecmp (method, if (0 == strcasecmp (method,
MHD_HTTP_METHOD_GET)) MHD_HTTP_METHOD_GET))
{ {
@ -292,6 +299,9 @@ cleanup (void *cls,
{ {
struct RequestCtx *rc = *con_cls; struct RequestCtx *rc = *con_cls;
(void) cls;
(void) connection;
(void) toe;
if (NULL == rc) if (NULL == rc)
return; return;
GNUNET_free (rc->code); GNUNET_free (rc->code);
@ -340,6 +350,7 @@ oauth_cleanup (void *cls,
{ {
struct OAuthState *oas = cls; struct OAuthState *oas = cls;
(void) cmd;
if (NULL != oas->mhd) if (NULL != oas->mhd)
{ {
MHD_stop_daemon (oas->mhd); MHD_stop_daemon (oas->mhd);

View File

@ -163,7 +163,7 @@ rewind_ip_run (void *cls,
break; break;
} }
} }
if (new_ip > is->ip) if (new_ip > (unsigned int) is->ip)
{ {
/* refuse to jump forward */ /* refuse to jump forward */
GNUNET_break (0); GNUNET_break (0);

View File

@ -206,26 +206,6 @@ wire_add_cleanup (void *cls,
} }
/**
* Offer internal data from a "wire_add" CMD, to other commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the object to offer.
*
* @return #GNUNET_OK on success.
*/
static int
wire_add_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
return GNUNET_NO;
}
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_set_wire_fee (const char *label, TALER_TESTING_cmd_set_wire_fee (const char *label,
const char *wire_method, const char *wire_method,
@ -247,8 +227,7 @@ TALER_TESTING_cmd_set_wire_fee (const char *label,
.cls = ds, .cls = ds,
.label = label, .label = label,
.run = &wire_add_run, .run = &wire_add_run,
.cleanup = &wire_add_cleanup, .cleanup = &wire_add_cleanup
.traits = &wire_add_traits
}; };
return cmd; return cmd;

View File

@ -281,7 +281,7 @@ reserve_status_cb (void *cls,
memset (found, memset (found,
0, 0,
sizeof (found)); sizeof (found));
for (unsigned int i = 0; i<=is->ip; i++) for (unsigned int i = 0; i<= (unsigned int) is->ip; i++)
{ {
struct TALER_TESTING_Command *cmd = &is->commands[i]; struct TALER_TESTING_Command *cmd = &is->commands[i];

View File

@ -178,26 +178,6 @@ wire_add_cleanup (void *cls,
} }
/**
* Offer internal data from a "wire_add" CMD, to other commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the object to offer.
*
* @return #GNUNET_OK on success.
*/
static int
wire_add_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
return GNUNET_NO;
}
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_wire_add (const char *label, TALER_TESTING_cmd_wire_add (const char *label,
const char *payto_uri, const char *payto_uri,
@ -215,8 +195,7 @@ TALER_TESTING_cmd_wire_add (const char *label,
.cls = ds, .cls = ds,
.label = label, .label = label,
.run = &wire_add_run, .run = &wire_add_run,
.cleanup = &wire_add_cleanup, .cleanup = &wire_add_cleanup
.traits = &wire_add_traits
}; };
return cmd; return cmd;

View File

@ -170,26 +170,6 @@ wire_del_cleanup (void *cls,
} }
/**
* Offer internal data from a "wire_del" CMD, to other commands.
*
* @param cls closure.
* @param[out] ret result.
* @param trait name of the trait.
* @param index index number of the object to offer.
*
* @return #GNUNET_OK on success.
*/
static int
wire_del_traits (void *cls,
const void **ret,
const char *trait,
unsigned int index)
{
return GNUNET_NO;
}
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_wire_del (const char *label, TALER_TESTING_cmd_wire_del (const char *label,
const char *payto_uri, const char *payto_uri,
@ -207,8 +187,7 @@ TALER_TESTING_cmd_wire_del (const char *label,
.cls = ds, .cls = ds,
.label = label, .label = label,
.run = &wire_del_run, .run = &wire_del_run,
.cleanup = &wire_del_cleanup, .cleanup = &wire_del_cleanup
.traits = &wire_del_traits
}; };
return cmd; return cmd;

View File

@ -23,14 +23,6 @@
#include "taler_signatures.h" #include "taler_signatures.h"
/**
* Check the signature in @a master_sig.
*
* @param payto_uri URL that is signed
* @param master_pub master public key of the exchange
* @param master_sig signature of the exchange
* @return #GNUNET_OK if signature is valid
*/
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_exchange_wire_signature_check ( TALER_exchange_wire_signature_check (
const char *payto_uri, const char *payto_uri,
@ -51,13 +43,6 @@ TALER_exchange_wire_signature_check (
} }
/**
* Create a signed wire statement for the given account.
*
* @param payto_uri account specification
* @param master_priv private key to sign with
* @param[out] master_sig where to write the signature
*/
void void
TALER_exchange_wire_signature_make ( TALER_exchange_wire_signature_make (
const char *payto_uri, const char *payto_uri,
@ -77,15 +62,6 @@ TALER_exchange_wire_signature_make (
} }
/**
* Compute the hash of the given wire details. The resulting
* @a hc is what will be put into the contract between customer
* and merchant for signing by both parties.
*
* @param payto_uri bank account
* @param salt salt used to eliminate brute-force inversion
* @param[out] hc set to the hash
*/
void void
TALER_merchant_wire_signature_hash (const char *payto_uri, TALER_merchant_wire_signature_hash (const char *payto_uri,
const struct TALER_WireSalt *salt, const struct TALER_WireSalt *salt,
@ -104,23 +80,6 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
} }
/**
* Check the signature in @a merch_sig.
* (Not yet used anywhere.)
*
* Expected to be used if/when we get @a merch_pub signed via
* X.509 *and* have a way for the WebEx wallet to check that the
* @a merch_pub provided matches that of the X.509 certificate
* from the Web site. Until then, @a merch_pub cannto be
* validated (no PKI), and hence there is no point in checking
* these signatures. (See #5129 and #3946).
*
* @param payto_uri URL that is signed
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_pub master public key of the merchant
* @param merch_sig signature of the merchant
* @return #GNUNET_OK if signature is valid
*/
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_merchant_wire_signature_check ( TALER_merchant_wire_signature_check (
const char *payto_uri, const char *payto_uri,
@ -143,14 +102,6 @@ TALER_merchant_wire_signature_check (
} }
/**
* Create a signed wire statement for the given account. (Not yet used anywhere.)
*
* @param payto_uri account specification
* @param salt the salt used to salt the @a payto_uri when hashing
* @param merch_priv private key to sign with
* @param[out] merch_sig where to write the signature
*/
void void
TALER_merchant_wire_signature_make ( TALER_merchant_wire_signature_make (
const char *payto_uri, const char *payto_uri,

View File

@ -419,6 +419,7 @@ handle_revoke_request (struct TES_Client *client,
struct Key *key; struct Key *key;
struct Key *nkey; struct Key *nkey;
(void) client;
key = NULL; key = NULL;
GNUNET_assert (0 == pthread_mutex_lock (&keys_lock)); GNUNET_assert (0 == pthread_mutex_lock (&keys_lock));
for (struct Key *pos = keys_head; for (struct Key *pos = keys_head;
@ -832,6 +833,7 @@ import_key (void *cls,
int fd; int fd;
struct stat sbuf; struct stat sbuf;
(void) cls;
{ {
struct stat lsbuf; struct stat lsbuf;

View File

@ -561,6 +561,7 @@ handle_revoke_request (struct TES_Client *client,
struct DenominationKey *ndk; struct DenominationKey *ndk;
struct Denomination *denom; struct Denomination *denom;
(void) client;
GNUNET_assert (0 == pthread_mutex_lock (&keys_lock)); GNUNET_assert (0 == pthread_mutex_lock (&keys_lock));
dk = GNUNET_CONTAINER_multihashmap_get (keys, dk = GNUNET_CONTAINER_multihashmap_get (keys,
&rr->h_rsa.hash); &rr->h_rsa.hash);

View File

@ -24,15 +24,6 @@
#include "taler_util.h" #include "taler_util.h"
/**
* Convert a buffer to an 8-character string representative of the
* contents. This is used for logging binary data when debugging.
*
* @param buf buffer to log
* @param buf_size number of bytes in @a buf
* @return text representation of buf, valid until next
* call to this function
*/
const char * const char *
TALER_b2s (const void *buf, TALER_b2s (const void *buf,
size_t buf_size) size_t buf_size)