|
From: <sv...@va...> - 2015-04-04 18:43:08
|
Author: florian
Date: Sat Apr 4 19:43:00 2015
New Revision: 15066
Log:
Tweak STATIC_ASSERT such that there is no warning about an unused
variable when used at block scope.
Modified:
trunk/include/pub_tool_basics.h
Modified: trunk/include/pub_tool_basics.h
==============================================================================
--- trunk/include/pub_tool_basics.h (original)
+++ trunk/include/pub_tool_basics.h Sat Apr 4 19:43:00 2015
@@ -369,7 +369,8 @@
})
// 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 */
|