From: Heikki Linnakangas Date: Mon, 12 Nov 2012 13:02:40 +0000 (+0200) Subject: Silence "expression result unused" warnings in AssertVariableIsOfTypeMacro X-Git-Tag: REL9_3_BETA1~725 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9d44a75d48ed8a9b9275b95be1fadaa562f3826;p=thirdparty%2Fpostgresql.git 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. --- 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 */