From 2d483142a7051389afe74c57a216843e6306f1a8 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 30 Jan 2019 13:28:41 +0200 Subject: Remove 'boost::optional'-related gcc warnings --- src/wallet/rpcwallet.cpp | 3 ++- src/wallet/wallet.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 270a61ade8..ada66ec7f9 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1591,7 +1591,8 @@ static UniValue listsinceblock(const JSONRPCRequest& request) auto locked_chain = pwallet->chain().lock(); LOCK(pwallet->cs_wallet); - Optional height; // Height of the specified block or the common ancestor, if the block provided was in a deactivated chain. + // The way the 'height' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0. + Optional height = MakeOptional(false, int()); // Height of the specified block or the common ancestor, if the block provided was in a deactivated chain. Optional altheight; // Height of the specified block, even if it's in a deactivated chain. int target_confirms = 1; isminefilter filter = ISMINE_SPENDABLE; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ddeff8ba09..a6cabe1f90 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1642,7 +1642,8 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc fAbortRescan = false; ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup uint256 tip_hash; - Optional block_height; + // The way the 'block_height' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0. + Optional block_height = MakeOptional(false, int()); double progress_begin; double progress_end; { -- cgit v1.2.3