mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
Remove names of parameters of callbacks which confuse gcc.
We annotate them with UNNEEDED, which is legal but weird, but it makes gcc (at least 11.2.0) complain about shadowing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106424 I simply removed the names. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
6fe570820e
commit
44d9e8d9c5
@ -155,7 +155,7 @@ u32 penalty_feerate(struct chain_topology *topo);
|
||||
* If failed is non-NULL, call that and don't rebroadcast. */
|
||||
void broadcast_tx(struct chain_topology *topo,
|
||||
struct channel *channel, const struct bitcoin_tx *tx,
|
||||
void (*failed)(struct channel *channel,
|
||||
void (*failed)(struct channel *,
|
||||
bool success,
|
||||
const char *err));
|
||||
/* Like the above, but with an additional `allowhighfees` parameter.
|
||||
@ -163,7 +163,7 @@ void broadcast_tx(struct chain_topology *topo,
|
||||
void broadcast_tx_ahf(struct chain_topology *topo,
|
||||
struct channel *channel, const struct bitcoin_tx *tx,
|
||||
bool allowhighfees,
|
||||
void (*failed)(struct channel *channel,
|
||||
void (*failed)(struct channel *,
|
||||
bool success,
|
||||
const char *err));
|
||||
|
||||
@ -194,8 +194,8 @@ static inline bool topology_synced(const struct chain_topology *topo)
|
||||
*/
|
||||
void topology_add_sync_waiter_(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
void (*cb)(struct chain_topology *topo,
|
||||
void *arg),
|
||||
void (*cb)(struct chain_topology *,
|
||||
void *),
|
||||
void *arg);
|
||||
#define topology_add_sync_waiter(ctx, topo, cb, arg) \
|
||||
topology_add_sync_waiter_((ctx), (topo), \
|
||||
|
@ -16,9 +16,9 @@ struct channel *any_channel_by_scid(struct lightningd *ld UNNEEDED,
|
||||
/* Generated stub for bitcoind_getutxout_ */
|
||||
void bitcoind_getutxout_(struct bitcoind *bitcoind UNNEEDED,
|
||||
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
||||
void (*cb)(struct bitcoind *bitcoind UNNEEDED,
|
||||
const struct bitcoin_tx_output *txout UNNEEDED,
|
||||
void *arg) UNNEEDED,
|
||||
void (*cb)(struct bitcoind * UNNEEDED,
|
||||
const struct bitcoin_tx_output * UNNEEDED,
|
||||
void *) UNNEEDED,
|
||||
void *arg UNNEEDED)
|
||||
{ fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); }
|
||||
/* Generated stub for bolt11_decode */
|
||||
@ -50,7 +50,7 @@ char *bolt11_encode_(const tal_t *ctx UNNEEDED,
|
||||
/* Generated stub for broadcast_tx */
|
||||
void broadcast_tx(struct chain_topology *topo UNNEEDED,
|
||||
struct channel *channel UNNEEDED, const struct bitcoin_tx *tx UNNEEDED,
|
||||
void (*failed)(struct channel *channel UNNEEDED,
|
||||
void (*failed)(struct channel * UNNEEDED,
|
||||
bool success UNNEEDED,
|
||||
const char *err))
|
||||
{ fprintf(stderr, "broadcast_tx called!\n"); abort(); }
|
||||
@ -911,7 +911,7 @@ struct txwatch *watch_txid(const tal_t *ctx UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
const struct bitcoin_txid *txid UNNEEDED,
|
||||
enum watch_result (*cb)(struct lightningd *ld UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
struct channel * UNNEEDED,
|
||||
const struct bitcoin_txid * UNNEEDED,
|
||||
const struct bitcoin_tx * UNNEEDED,
|
||||
unsigned int depth))
|
||||
@ -921,7 +921,7 @@ struct txowatch *watch_txo(const tal_t *ctx UNNEEDED,
|
||||
struct chain_topology *topo UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
||||
enum watch_result (*cb)(struct channel *channel UNNEEDED,
|
||||
enum watch_result (*cb)(struct channel * UNNEEDED,
|
||||
const struct bitcoin_tx *tx UNNEEDED,
|
||||
size_t input_num UNNEEDED,
|
||||
const struct block *block))
|
||||
|
@ -123,9 +123,9 @@ struct txwatch *watch_txid(const tal_t *ctx,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *txid,
|
||||
enum watch_result (*cb)(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *txid,
|
||||
const struct bitcoin_tx *tx,
|
||||
struct channel *,
|
||||
const struct bitcoin_txid *,
|
||||
const struct bitcoin_tx *,
|
||||
unsigned int depth))
|
||||
{
|
||||
struct txwatch *w;
|
||||
@ -189,7 +189,7 @@ struct txowatch *watch_txo(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_outpoint *outpoint,
|
||||
enum watch_result (*cb)(struct channel *channel,
|
||||
enum watch_result (*cb)(struct channel *channel_,
|
||||
const struct bitcoin_tx *tx,
|
||||
size_t input_num,
|
||||
const struct block *block))
|
||||
|
@ -35,7 +35,7 @@ struct txwatch *watch_txid(const tal_t *ctx,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *txid,
|
||||
enum watch_result (*cb)(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
struct channel *,
|
||||
const struct bitcoin_txid *,
|
||||
const struct bitcoin_tx *,
|
||||
unsigned int depth));
|
||||
@ -45,7 +45,7 @@ struct txwatch *watch_tx(const tal_t *ctx,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_tx *tx,
|
||||
enum watch_result (*cb)(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
struct channel *,
|
||||
const struct bitcoin_txid *,
|
||||
const struct bitcoin_tx *,
|
||||
unsigned int depth));
|
||||
@ -54,7 +54,7 @@ struct txowatch *watch_txo(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_outpoint *outpoint,
|
||||
enum watch_result (*cb)(struct channel *channel,
|
||||
enum watch_result (*cb)(struct channel *,
|
||||
const struct bitcoin_tx *tx,
|
||||
size_t input_num,
|
||||
const struct block *block));
|
||||
|
@ -52,9 +52,9 @@ size_t bigsize_put(u8 buf[BIGSIZE_MAX_LEN] UNNEEDED, bigsize_t v UNNEEDED)
|
||||
/* Generated stub for bitcoind_getutxout_ */
|
||||
void bitcoind_getutxout_(struct bitcoind *bitcoind UNNEEDED,
|
||||
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
||||
void (*cb)(struct bitcoind *bitcoind UNNEEDED,
|
||||
const struct bitcoin_tx_output *txout UNNEEDED,
|
||||
void *arg) UNNEEDED,
|
||||
void (*cb)(struct bitcoind * UNNEEDED,
|
||||
const struct bitcoin_tx_output * UNNEEDED,
|
||||
void *) UNNEEDED,
|
||||
void *arg UNNEEDED)
|
||||
{ fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); }
|
||||
/* Generated stub for blinding_hash_e_and_ss */
|
||||
@ -70,7 +70,7 @@ bool blinding_next_pubkey(const struct pubkey *pk UNNEEDED,
|
||||
/* Generated stub for broadcast_tx */
|
||||
void broadcast_tx(struct chain_topology *topo UNNEEDED,
|
||||
struct channel *channel UNNEEDED, const struct bitcoin_tx *tx UNNEEDED,
|
||||
void (*failed)(struct channel *channel UNNEEDED,
|
||||
void (*failed)(struct channel * UNNEEDED,
|
||||
bool success UNNEEDED,
|
||||
const char *err))
|
||||
{ fprintf(stderr, "broadcast_tx called!\n"); abort(); }
|
||||
@ -711,8 +711,8 @@ void subkey_from_hmac(const char *prefix UNNEEDED,
|
||||
/* Generated stub for topology_add_sync_waiter_ */
|
||||
void topology_add_sync_waiter_(const tal_t *ctx UNNEEDED,
|
||||
struct chain_topology *topo UNNEEDED,
|
||||
void (*cb)(struct chain_topology *topo UNNEEDED,
|
||||
void *arg) UNNEEDED,
|
||||
void (*cb)(struct chain_topology * UNNEEDED,
|
||||
void *) UNNEEDED,
|
||||
void *arg UNNEEDED)
|
||||
{ fprintf(stderr, "topology_add_sync_waiter_ called!\n"); abort(); }
|
||||
/* Generated stub for towire_channeld_config_channel */
|
||||
@ -847,7 +847,7 @@ struct txwatch *watch_txid(const tal_t *ctx UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
const struct bitcoin_txid *txid UNNEEDED,
|
||||
enum watch_result (*cb)(struct lightningd *ld UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
struct channel * UNNEEDED,
|
||||
const struct bitcoin_txid * UNNEEDED,
|
||||
const struct bitcoin_tx * UNNEEDED,
|
||||
unsigned int depth))
|
||||
@ -857,7 +857,7 @@ struct txowatch *watch_txo(const tal_t *ctx UNNEEDED,
|
||||
struct chain_topology *topo UNNEEDED,
|
||||
struct channel *channel UNNEEDED,
|
||||
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
||||
enum watch_result (*cb)(struct channel *channel UNNEEDED,
|
||||
enum watch_result (*cb)(struct channel * UNNEEDED,
|
||||
const struct bitcoin_tx *tx UNNEEDED,
|
||||
size_t input_num UNNEEDED,
|
||||
const struct block *block))
|
||||
|
Loading…
Reference in New Issue
Block a user