Skip to content

Commit 5d8fa82

Browse files
Merge bitcoin-core/secp256k1#1274: test: Silent noisy clang warnings about Valgrind code on macOS x86_64
747ada3 test: Silent noisy clang warnings about Valgrind code on macOS x86_64 (Hennadii Stepanov) Pull request description: Since bitcoin#1206, on macOS x86_64 with Valgrind installed, clang emits a massive amount of `-Wreserved-identifier` and `-Wreserved-macro-identifier` warnings from the `valgrind/valgrind.h` and `valgrind/memcheck.h` headers. This PR prevents warnings emitted for the Valgrind code. ACKs for top commit: real-or-random: utACK 747ada3 Tree-SHA512: dd1b2b9db2d471939fdc30f9d8fd106a12f21ec5008ca98d8ebe3087d7ea352d564e8bbd0cec59a004e084af3a84d4680cb81f2ef6fe13cf164b7691e33f437d
2 parents b327abf + 747ada3 commit 5d8fa82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/checkmem.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@
5858
#if !defined SECP256K1_CHECKMEM_ENABLED
5959
# if defined VALGRIND
6060
# include <stddef.h>
61+
# if defined(__clang__) && defined(__APPLE__)
62+
# pragma clang diagnostic push
63+
# pragma clang diagnostic ignored "-Wreserved-identifier"
64+
# endif
6165
# include <valgrind/memcheck.h>
66+
# if defined(__clang__) && defined(__APPLE__)
67+
# pragma clang diagnostic pop
68+
# endif
6269
# define SECP256K1_CHECKMEM_ENABLED 1
6370
# define SECP256K1_CHECKMEM_UNDEFINE(p, len) VALGRIND_MAKE_MEM_UNDEFINED((p), (len))
6471
# define SECP256K1_CHECKMEM_DEFINE(p, len) VALGRIND_MAKE_MEM_DEFINED((p), (len))

0 commit comments

Comments
 (0)