Skip to content

validation: -Wmaybe-uninitialized compiler warning thrown by CTxMempool::GetIterSet  #21248

@jarolrod

Description

@jarolrod

When compiling from master, I get the following warning using GCC 10.2.1

txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
txmempool.cpp:894:29: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  894 |     return Optional<txiter>{};
      |                             ^

System:
OS: Debian Buster
Compiler: GCC 10.2.1

Steps to reproduce:

  • grab master
  • go through the compilation process
  • get -Wmaybe-uninitialized compiler warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions