aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net.cpp4
-rw-r--r--src/net_processing.cpp3
-rw-r--r--src/ui_interface.cpp3
-rw-r--r--src/validation.cpp7
4 files changed, 10 insertions, 7 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 3c6f5a05f3..75a47d7ad2 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2287,8 +2287,8 @@ public:
WSACleanup();
#endif
}
-}
-instance_of_cnetcleanup;
+};
+static CNetCleanup instance_of_cnetcleanup;
void CConnman::Interrupt()
{
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index e57706980a..5ff456fcb0 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -4086,4 +4086,5 @@ public:
mapOrphanTransactions.clear();
mapOrphanTransactionsByPrev.clear();
}
-} instance_of_cnetprocessingcleanup;
+};
+static CNetProcessingCleanup instance_of_cnetprocessingcleanup;
diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp
index 746514a01f..d310637145 100644
--- a/src/ui_interface.cpp
+++ b/src/ui_interface.cpp
@@ -21,7 +21,8 @@ struct UISignals {
boost::signals2::signal<CClientUIInterface::NotifyBlockTipSig> NotifyBlockTip;
boost::signals2::signal<CClientUIInterface::NotifyHeaderTipSig> NotifyHeaderTip;
boost::signals2::signal<CClientUIInterface::BannedListChangedSig> 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<signal_name##Sig> fn) \
diff --git a/src/validation.cpp b/src/validation.cpp
index 3026df34fe..2d2252c251 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -77,7 +77,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIn
return false;
}
-CChainState g_chainstate;
+static CChainState g_chainstate;
CChainState& ChainstateActive() { return g_chainstate; }
@@ -1044,7 +1044,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)
{
@@ -4757,4 +4757,5 @@ public:
delete (*it1).second;
mapBlockIndex.clear();
}
-} instance_of_cmaincleanup;
+};
+static CMainCleanup instance_of_cmaincleanup;