From e331c60ea727f998eb1023e8a2c468692d10032e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 18 Oct 2011 21:44:23 -0400 Subject: Suppress remaining -Waddress warnings from recent gcc versions. Still an exercise in satisfying pedants. --- src/interfaces/libpq/pqexpbuffer.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/interfaces/libpq/pqexpbuffer.h') diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h index d60fedc762..59cefbfb94 100644 --- a/src/interfaces/libpq/pqexpbuffer.h +++ b/src/interfaces/libpq/pqexpbuffer.h @@ -59,6 +59,14 @@ typedef PQExpBufferData *PQExpBuffer; #define PQExpBufferBroken(str) \ ((str) == NULL || (str)->maxlen == 0) +/*------------------------ + * Same, but for use when using a static or local PQExpBufferData struct. + * For that, a null-pointer test is useless and may draw compiler warnings. + *------------------------ + */ +#define PQExpBufferDataBroken(buf) \ + ((buf).maxlen == 0) + /*------------------------ * Initial size of the data buffer in a PQExpBuffer. * NB: this must be large enough to hold error messages that might -- cgit v1.2.1