From 29c66ace5c777b56cd9e19756a1ab0801d15a5ae Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sat, 14 Nov 2020 03:20:07 +0200 Subject: [PATCH 1/2] Silence false positive GCC warning --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ebcab1227d..922dbb05de 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3593,7 +3593,7 @@ static RPCHelpMan rescanblockchain() } int start_height = 0; - Optional stop_height; + Optional stop_height = MakeOptional(false, int()); uint256 start_block; { LOCK(pwallet->cs_wallet); From 049feabf289ace817a3da62fe84942d0200b8f0b Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sat, 14 Nov 2020 10:56:38 +0200 Subject: [PATCH 2/2] Add missing optional.h include --- src/wallet/rpcwallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 922dbb05de..0fbb212732 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include