summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/pqexpbuffer.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-10-18 21:44:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-10-18 21:44:23 -0400
commite331c60ea727f998eb1023e8a2c468692d10032e (patch)
tree0fa376584d4b3e981b467e5a07ef9b7f5df99218 /src/interfaces/libpq/pqexpbuffer.h
parentaa90e148ca70a235897b1227f1a7cd1c66bc5368 (diff)
downloadpostgresql-e331c60ea727f998eb1023e8a2c468692d10032e.tar.gz
Suppress remaining -Waddress warnings from recent gcc versions.
Still an exercise in satisfying pedants.
Diffstat (limited to 'src/interfaces/libpq/pqexpbuffer.h')
-rw-r--r--src/interfaces/libpq/pqexpbuffer.h8
1 files changed, 8 insertions, 0 deletions
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
@@ -60,6 +60,14 @@ typedef PQExpBufferData *PQExpBuffer;
((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
* be returned by PQrequestCancel().