From: Florian Krohm Date: Sat, 4 Apr 2015 18:43:00 +0000 (+0000) Subject: Tweak STATIC_ASSERT such that there is no warning about an unused X-Git-Tag: svn/VALGRIND_3_11_0~527 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87a05e65b13572ee8944f40c0613383eae49f19c;p=thirdparty%2Fvalgrind.git Tweak STATIC_ASSERT such that there is no warning about an unused variable when used at block scope. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15066 --- diff --git a/include/pub_tool_basics.h b/include/pub_tool_basics.h index aa5ed7564a..f6f192cb7d 100644 --- a/include/pub_tool_basics.h +++ b/include/pub_tool_basics.h @@ -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 */