Skip to content

Commit

Permalink
Ignore gcc -Wunknown-pragmas in tinyformat.h
Browse files Browse the repository at this point in the history
As without this, GCC warns on the following unrecognized clang pragmas.
bitcoin#15112 (comment)
  • Loading branch information
Empact committed Apr 22, 2022
1 parent 0e45825 commit 58ca282
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/util_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,7 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
#if defined(HAVE_W_ZERO_AS_NULL_POINTER_CONSTANT)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
Expand Down
1 change: 1 addition & 0 deletions src/tinyformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
#if defined(HAVE_W_ZERO_AS_NULL_POINTER_CONSTANT)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
Expand Down
1 change: 1 addition & 0 deletions src/wallet/sqlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static void ErrorLogCallback(void* arg, int code, const char* msg)
#if defined(HAVE_W_ZERO_AS_NULL_POINTER_CONSTANT)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
Expand Down

0 comments on commit 58ca282

Please sign in to comment.