]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Tweak STATIC_ASSERT such that there is no warning about an unused
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 4 Apr 2015 18:43:11 +0000 (18:43 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 4 Apr 2015 18:43:11 +0000 (18:43 +0000)
variable when used at block scope.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3118

VEX/priv/main_util.h

index 4dcdd946d953751838530346e4b6aee73d6de4ad..018ba4fdeb172123b8ab1e50ca6607e74db8ab53 100644 (file)
@@ -51,7 +51,8 @@
 #endif
 
 // Poor man's static assert
-#define STATIC_ASSERT(x)  extern int vex__unused_array[(x) ? 1 : -1]
+#define STATIC_ASSERT(x)  extern int vex__unused_array[(x) ? 1 : -1] \
+                                     __attribute__((unused))
 
 /* Stuff for panicking and assertion. */