summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas2012-11-12 13:02:40 +0000
committerHeikki Linnakangas2012-11-12 13:02:40 +0000
commitc9d44a75d48ed8a9b9275b95be1fadaa562f3826 (patch)
tree5ad1d5cd50ad1bfd99b019f7d7b6d9c2b0d15638 /src/include
parent42218f29af41c430b94e0d074f404816de4ba278 (diff)
Silence "expression result unused" warnings in AssertVariableIsOfTypeMacro
At least clang 3.1 generates those warnings. Prepend (void) to avoid them, like we have in AssertMacro.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 3b0fa9c4f01..a6c0e6e6505 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -736,15 +736,15 @@ typedef NameData *Name;
StaticAssertStmt(__builtin_types_compatible_p(__typeof__(varname), typename), \
CppAsString(varname) " does not have type " CppAsString(typename))
#define AssertVariableIsOfTypeMacro(varname, typename) \
- StaticAssertExpr(__builtin_types_compatible_p(__typeof__(varname), typename), \
- CppAsString(varname) " does not have type " CppAsString(typename))
+ ((void) StaticAssertExpr(__builtin_types_compatible_p(__typeof__(varname), typename), \
+ CppAsString(varname) " does not have type " CppAsString(typename)))
#else /* !HAVE__BUILTIN_TYPES_COMPATIBLE_P */
#define AssertVariableIsOfType(varname, typename) \
StaticAssertStmt(sizeof(varname) == sizeof(typename), \
CppAsString(varname) " does not have type " CppAsString(typename))
#define AssertVariableIsOfTypeMacro(varname, typename) \
- StaticAssertExpr(sizeof(varname) == sizeof(typename), \
- CppAsString(varname) " does not have type " CppAsString(typename))
+ ((void) StaticAssertExpr(sizeof(varname) == sizeof(typename), \
+ CppAsString(varname) " does not have type " CppAsString(typename)))
#endif /* HAVE__BUILTIN_TYPES_COMPATIBLE_P */