aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-13 10:19:54 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-13 10:20:44 +0300
commitc713bb2b243881a771ab288340ffeb623c82d7f6 (patch)
tree29a19274f0aef717f8ca92bfde81798d4ea67628 /src
parentf0b457212f9876a8c7e4d680178b49b555b488e2 (diff)
downloadbitcoin-c713bb2b243881a771ab288340ffeb623c82d7f6.tar.xz
Fix Windows build with --enable-werror on Ubuntu Focal
Diffstat (limited to 'src')
-rw-r--r--src/fs.cpp8
-rw-r--r--src/qt/winshutdownmonitor.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/fs.cpp b/src/fs.cpp
index 4f20ca4d28..7884c18646 100644
--- a/src/fs.cpp
+++ b/src/fs.cpp
@@ -154,7 +154,10 @@ std::string get_filesystem_error_message(const fs::filesystem_error& e)
#ifdef __GLIBCXX__
// reference: https://github.com/gcc-mirror/gcc/blob/gcc-7_3_0-release/libstdc%2B%2B-v3/include/std/fstream#L270
-
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch"
+#endif
static std::string openmodeToStr(std::ios_base::openmode mode)
{
switch (mode & ~std::ios_base::ate) {
@@ -192,6 +195,9 @@ static std::string openmodeToStr(std::ios_base::openmode mode)
return std::string();
}
}
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
void ifstream::open(const fs::path& p, std::ios_base::openmode mode)
{
diff --git a/src/qt/winshutdownmonitor.h b/src/qt/winshutdownmonitor.h
index 8edb98c744..bf399edcf3 100644
--- a/src/qt/winshutdownmonitor.h
+++ b/src/qt/winshutdownmonitor.h
@@ -17,7 +17,7 @@ class WinShutdownMonitor : public QAbstractNativeEventFilter
{
public:
/** Implements QAbstractNativeEventFilter interface for processing Windows messages */
- bool nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult);
+ bool nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult) override;
/** Register the reason for blocking shutdown on Windows to allow clean client exit */
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);