mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
ci: adds flag -Werror=reorder for arm target (#5540)
## 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: https://github.com/dashpay/dash/pull/5531#discussion_r1299404387 ## 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: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone
This commit is contained in:
parent
c37cbf3f46
commit
3443630a8c
@ -437,6 +437,7 @@ if test "x$enable_werror" = "xyes"; then
|
||||
if test "x$CXXFLAG_WERROR" = "x"; then
|
||||
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
|
||||
fi
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=reorder],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=reorder"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=shadow-field],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=shadow-field"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]])
|
||||
|
@ -34,12 +34,12 @@ CSimplifiedMNListEntry::CSimplifiedMNListEntry(const CDeterministicMN& dmn) :
|
||||
pubKeyOperator(dmn.pdmnState->pubKeyOperator),
|
||||
keyIDVoting(dmn.pdmnState->keyIDVoting),
|
||||
isValid(!dmn.pdmnState->IsBanned()),
|
||||
platformHTTPPort(dmn.pdmnState->platformHTTPPort),
|
||||
platformNodeID(dmn.pdmnState->platformNodeID),
|
||||
scriptPayout(dmn.pdmnState->scriptPayout),
|
||||
scriptOperatorPayout(dmn.pdmnState->scriptOperatorPayout),
|
||||
nVersion(dmn.pdmnState->nVersion == CProRegTx::LEGACY_BLS_VERSION ? LEGACY_BLS_VERSION : BASIC_BLS_VERSION),
|
||||
nType(dmn.nType),
|
||||
platformHTTPPort(dmn.pdmnState->platformHTTPPort),
|
||||
platformNodeID(dmn.pdmnState->platformNodeID)
|
||||
nType(dmn.nType)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,12 @@ public:
|
||||
CBLSLazyPublicKey pubKeyOperator;
|
||||
CKeyID keyIDVoting;
|
||||
bool isValid{false};
|
||||
MnType nType{MnType::Regular};
|
||||
uint16_t platformHTTPPort{0};
|
||||
uint160 platformNodeID{};
|
||||
CScript scriptPayout; // mem-only
|
||||
CScript scriptOperatorPayout; // mem-only
|
||||
uint16_t nVersion{LEGACY_BLS_VERSION};
|
||||
MnType nType{MnType::Regular};
|
||||
|
||||
CSimplifiedMNListEntry() = default;
|
||||
explicit CSimplifiedMNListEntry(const CDeterministicMN& dmn);
|
||||
|
@ -303,9 +303,9 @@ private:
|
||||
|
||||
const CChainParams& m_chainparams;
|
||||
CConnman& m_connman;
|
||||
CAddrMan& m_addrman;
|
||||
/** Pointer to this node's banman. May be nullptr - check existence before dereferencing. */
|
||||
BanMan* const m_banman;
|
||||
CAddrMan& m_addrman;
|
||||
ChainstateManager& m_chainman;
|
||||
CTxMemPool& m_mempool;
|
||||
const std::unique_ptr<LLMQContext>& m_llmq_ctx;
|
||||
|
@ -46,9 +46,9 @@ WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, ClientModel
|
||||
transactionTableModel(nullptr),
|
||||
recentRequestsTableModel(nullptr),
|
||||
cachedEncryptionStatus(Unencrypted),
|
||||
timer(new QTimer(this)),
|
||||
cachedNumISLocks(0),
|
||||
cachedCoinJoinRounds(0),
|
||||
timer(new QTimer(this))
|
||||
cachedCoinJoinRounds(0)
|
||||
{
|
||||
fHaveWatchOnly = m_wallet->haveWatchOnly();
|
||||
addressTableModel = new AddressTableModel(this);
|
||||
|
Loading…
Reference in New Issue
Block a user