diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-08-27 08:26:01 +0200 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-08-27 08:31:45 +0200 |
commit | 19364c0ddf227874b7b0df0ea1b240f082d60e23 (patch) | |
tree | c4d22d3f831a33d300a39c569890ad6818dcc5a0 /src/fs.cpp | |
parent | adccbb380b2ee8abbc2f337cd69b4f13cd763602 (diff) | |
parent | b367745cfe19f6de3f44b3adc90fa08e36e44bb6 (diff) |
Merge bitcoin/bitcoin#20586: Fix Windows build with --enable-werror
b367745cfe19f6de3f44b3adc90fa08e36e44bb6 ci: Make Cirrus CI Windows build with --enable-werror (Hennadii Stepanov)
c713bb2b243881a771ab288340ffeb623c82d7f6 Fix Windows build with --enable-werror on Ubuntu Focal (Hennadii Stepanov)
Pull request description:
This PR makes possible to cross-compile Windows build with `--enable-werror --enable-suppress-external-warnings`.
Some problems are fixed, others are silenced.
Also `--enable-werror` is enabled for Cirrus CI Windows build (the last one on Cirrus CI without `--enable-werror`).
ACKs for top commit:
practicalswift:
cr ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6: patch looks correct
laanwj:
Code review ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
vasild:
ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
jarolrod:
ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
Tree-SHA512: 64f5c99b7dad4c0efce80cd45d7074f275bd8411235dc9e0841287bdab64b812c6f8f9d632c35531d0b8210148531f53aaaac77be7699b29d2d6aaae304dbee0
Diffstat (limited to 'src/fs.cpp')
-rw-r--r-- | src/fs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fs.cpp b/src/fs.cpp index 89c7ad27dc..b9b3c46d8d 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) { |