mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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.
This commit is contained in:
parent
42218f29af
commit
c9d44a75d4
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user