]> 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:00 +0000 (18:43 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 4 Apr 2015 18:43:00 +0000 (18:43 +0000)
variable when used at block scope.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15066

include/pub_tool_basics.h

index aa5ed7564add00313448455803f3a0cd435cc10a..f6f192cb7d190cd4665f7be87efd4f02e04468f1 100644 (file)
@@ -369,7 +369,8 @@ static inline Bool sr_EQ ( SysRes sr1, SysRes sr2 ) {
    })
 
 // Poor man's static assert
-#define STATIC_ASSERT(x)  extern int VG_(VG_(VG_(unused)))[(x) ? 1 : -1]
+#define STATIC_ASSERT(x)  extern int VG_(VG_(VG_(unused)))[(x) ? 1 : -1] \
+                                     __attribute__((unused))
 
 #endif /* __PUB_TOOL_BASICS_H */