-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: adds flag -Werror=reorder for arm target #5540
Conversation
…ir order It fixes this warning: net_processing.cpp: In constructor ‘{anonymous}::PeerManagerImpl::PeerManagerImpl(const CChainParams&, CConnman&, CAddrMan&, BanMan*, CScheduler&, ChainstateManager&, CTxMemPool&, const std::unique_ptr<LLMQContext>&, bool)’: net_processing.cpp:308:15: error: ‘{anonymous}::PeerManagerImpl::m_addrman’ will be initialized after [-Werror=reorder] 308 | CAddrMan& m_addrman; | ^~~~~~~~~ net_processing.cpp:307:19: error: ‘BanMan* const {anonymous}::PeerManagerImpl::m_banman’ [-Werror=reorder] 307 | BanMan* const m_banman; | ^~~~~~~~ net_processing.cpp:1547:1: error: when initialized here [-Werror=reorder] 1547 | PeerManagerImpl::PeerManagerImpl(const CChainParams& chainparams, CConnman& connman, CAddrMan& addrman, BanMan* banman, | ^~~~~~~~~~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Issue being fixed or feature implemented
The order of members in a class/struct definition and the order of their initialization should match. This ensures that the code is more error-proof in cases where the order of member initializations is important, as they may depend on each other.
Instead manual checking of member initialization better let CI handle it.
Last PR where it's noticed: #5531 (comment)
What was done?
New flag "-Werror=reorder" for
configure.ac
and fixes existing code.How Has This Been Tested?
Build code with
--enable-werror
Breaking Changes
N/A
Checklist: