mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Merge bitcoin/bitcoin#20586: Fix Windows build with --enable-werror
b367745cfeci: Make Cirrus CI Windows build with --enable-werror (Hennadii Stepanov)c713bb2b24Fix 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 ACKb367745cfe: patch looks correct laanwj: Code review ACKb367745cfevasild: ACKb367745cfejarolrod: ACKb367745cfeTree-SHA512: 64f5c99b7dad4c0efce80cd45d7074f275bd8411235dc9e0841287bdab64b812c6f8f9d632c35531d0b8210148531f53aaaac77be7699b29d2d6aaae304dbee0
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user