From 5ff84aece91c6ba98bf5e8565f3f5a310d467f3b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 31 Mar 2025 12:36:35 +1030 Subject: [PATCH] lightningd: mangle parameter names in bitcoind_getrawblockbyheight_ so mocks don't get shadow warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we make mocks (which the next patch will do), these names cause a warning: ``` wallet/test/run-db.c:32:64: error: declaration of ‘bitcoind’ shadows a parameter [-Werror=shadow=compatible-local] 32 | void (*cb)(struct bitcoind *bitcoind UNNEEDED, wallet/test/run-db.c:30:53: note: shadowed declaration is here 30 | struct bitcoind *bitcoind UNNEEDED, wallet/test/run-db.c:33:51: error: declaration of ‘height’ shadows a parameter [-Werror=shadow=compatible-local] 33 | u32 height UNNEEDED, wallet/test/run-db.c:31:40: note: shadowed declaration is here 31 | u32 height UNNEEDED, ``` Signed-off-by: Rusty Russell --- lightningd/bitcoind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightningd/bitcoind.h b/lightningd/bitcoind.h index 194739475..cf92e9075 100644 --- a/lightningd/bitcoind.h +++ b/lightningd/bitcoind.h @@ -127,8 +127,8 @@ void bitcoind_getchaininfo_(const tal_t *ctx, void bitcoind_getrawblockbyheight_(const tal_t *ctx, struct bitcoind *bitcoind, u32 height, - void (*cb)(struct bitcoind *bitcoind, - u32 height, + void (*cb)(struct bitcoind *bitcoind_, + u32 height_, struct bitcoin_blkid *blkid, struct bitcoin_block *blk, void *arg),