mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 02:08:53 +00:00
Merge pull request #2806
da706b61
Fix false GCC warning '‘*((void*)& subaddr_account +4)’ may be used unitialized' (binaryFate)
This commit is contained in:
commit
82375f7de7
@ -1080,7 +1080,9 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
|
||||
}
|
||||
|
||||
uint64_t tx_money_spent_in_ins = 0;
|
||||
boost::optional<uint32_t> subaddr_account;
|
||||
// The line below is equivalent to "boost::optional<uint32_t> subaddr_account;", but avoids the GCC warning: ‘*((void*)& subaddr_account +4)’ may be used uninitialized in this function
|
||||
// It's a GCC bug with boost::optional, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679
|
||||
auto subaddr_account ([]()->boost::optional<uint32_t> {return boost::none;}());
|
||||
std::set<uint32_t> subaddr_indices;
|
||||
// check all outputs for spending (compare key images)
|
||||
for(auto& in: tx.vin)
|
||||
|
Loading…
Reference in New Issue
Block a user