aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.leveldb.include2
-rw-r--r--src/qt/rpcconsole.cpp7
-rw-r--r--src/wallet/db.cpp7
-rw-r--r--src/wallet/db.h9
4 files changed, 20 insertions, 5 deletions
diff --git a/src/Makefile.leveldb.include b/src/Makefile.leveldb.include
index 79ff72ca8d..8a28f4f249 100644
--- a/src/Makefile.leveldb.include
+++ b/src/Makefile.leveldb.include
@@ -36,7 +36,7 @@ LEVELDB_CPPFLAGS_INT += -DLEVELDB_PLATFORM_POSIX
endif
leveldb_libleveldb_a_CPPFLAGS = $(AM_CPPFLAGS) $(LEVELDB_CPPFLAGS_INT) $(LEVELDB_CPPFLAGS)
-leveldb_libleveldb_a_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized, $(AM_CXXFLAGS)) $(PIE_FLAGS)
+leveldb_libleveldb_a_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized -Wsuggest-override -Werror=suggest-override, $(AM_CXXFLAGS)) $(PIE_FLAGS)
leveldb_libleveldb_a_SOURCES=
leveldb_libleveldb_a_SOURCES += leveldb/port/port_stdcxx.h
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index b7fbca50ac..2d4af3f9e6 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -24,7 +24,7 @@
#include <univalue.h>
#ifdef ENABLE_WALLET
-#include <db_cxx.h>
+#include <wallet/db.h>
#include <wallet/wallet.h>
#endif
@@ -34,9 +34,10 @@
#include <QScrollBar>
#include <QScreen>
#include <QSettings>
+#include <QString>
+#include <QStringList>
#include <QTime>
#include <QTimer>
-#include <QStringList>
// TODO: add a scrollback limit, as there is currently none
// TODO: make it possible to filter out categories (esp debug messages when implemented)
@@ -480,7 +481,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
// set library version labels
#ifdef ENABLE_WALLET
- ui->berkeleyDBVersion->setText(DbEnv::version(nullptr, nullptr, nullptr));
+ ui->berkeleyDBVersion->setText(QString::fromStdString(BerkeleyDatabaseVersion()));
#else
ui->label_berkeleyDBVersion->hide();
ui->berkeleyDBVersion->hide();
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 3f7c2d09cc..1b2bd83a4c 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -399,7 +399,7 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, bilingual_str&
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, walletFile);
fs::path walletDir = env->Directory();
- LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
+ LogPrintf("Using BerkeleyDB version %s\n", BerkeleyDatabaseVersion());
LogPrintf("Using wallet %s\n", file_path.string());
if (!env->Open(true /* retry */)) {
@@ -916,3 +916,8 @@ void BerkeleyDatabase::ReloadDbEnv()
env->ReloadDbEnv();
}
}
+
+std::string BerkeleyDatabaseVersion()
+{
+ return DbEnv::version(nullptr, nullptr, nullptr);
+}
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 1bf3375475..37f96a1a96 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -19,7 +19,14 @@
#include <unordered_map>
#include <vector>
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsuggest-override"
+#endif
#include <db_cxx.h>
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
struct bilingual_str;
@@ -402,4 +409,6 @@ public:
bool static Rewrite(BerkeleyDatabase& database, const char* pszSkip = nullptr);
};
+std::string BerkeleyDatabaseVersion();
+
#endif // BITCOIN_WALLET_DB_H