diff --git a/src/net.cpp b/src/net.cpp index 0a1670997d..d30c9f5fd8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -3111,8 +3111,8 @@ public: WSACleanup(); #endif } -} -instance_of_cnetcleanup; +}; +static CNetCleanup instance_of_cnetcleanup; void CExplicitNetCleanup::callCleanup() { diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 07b1253d8c..7f02d39b96 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4863,4 +4863,5 @@ public: mapOrphanTransactionsByPrev.clear(); nMapOrphanTransactionsSize = 0; } -} instance_of_cnetprocessingcleanup; +}; +static CNetProcessingCleanup instance_of_cnetprocessingcleanup; diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp index 2352581cf0..fc2826fffa 100644 --- a/src/ui_interface.cpp +++ b/src/ui_interface.cpp @@ -25,7 +25,8 @@ struct UISignals { boost::signals2::signal NotifyMasternodeListChanged; boost::signals2::signal NotifyAdditionalDataSyncProgressChanged; boost::signals2::signal BannedListChanged; -} g_ui_signals; +}; +static UISignals g_ui_signals; #define ADD_SIGNALS_IMPL_WRAPPER(signal_name) \ boost::signals2::connection CClientUIInterface::signal_name##_connect(std::function fn) \ diff --git a/src/validation.cpp b/src/validation.cpp index 65816665f5..e7de571b3b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -101,7 +101,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex* pa, const CBlockIn return false; } -CChainState g_chainstate; +static CChainState g_chainstate; CChainState& ChainstateActive() { return g_chainstate; } CChain& ChainActive() { return g_chainstate.m_chain; } @@ -1133,7 +1133,7 @@ bool CChainState::IsInitialBlockDownload() const return false; } -CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr; +static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr; static void AlertNotify(const std::string& strMessage) { @@ -5183,4 +5183,5 @@ public: delete (*it1).second; mapBlockIndex.clear(); } -} instance_of_cmaincleanup; +}; +static CMainCleanup instance_of_cmaincleanup;