mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
wallet/walletrpc.c: fix uninitialized warning.
The withdraw_tx function shouldn't use it, but GCC is right it's uninitialized: wallet/walletrpc.c: In function ‘json_prepare_tx’: wallet/walletrpc.c:202:15: error: ‘changekey’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
296cfe8d1b
commit
1510ea5717
1 changed files with 2 additions and 1 deletions
|
@ -198,7 +198,8 @@ static struct command_result *json_prepare_tx(struct command *cmd,
|
|||
if (!bip32_pubkey(cmd->ld->wallet->bip32_base, changekey,
|
||||
(*utx)->wtx->change_key_index))
|
||||
return command_fail(cmd, LIGHTNINGD, "Keys generation failure");
|
||||
}
|
||||
} else
|
||||
changekey = NULL;
|
||||
|
||||
(*utx)->tx = withdraw_tx(*utx, get_chainparams(cmd->ld), (*utx)->wtx->utxos,
|
||||
(*utx)->destination, (*utx)->wtx->amount,
|
||||
|
|
Loading…
Add table
Reference in a new issue