aboutsummaryrefslogtreecommitdiff
path: root/src/include/lib/stringinfo.h
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-04-28 10:56:14 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-04-28 10:56:14 -0400
commitc02d5b7c27d740830379244db4b9ef111bbf0fc8 (patch)
treef1de6c2b7db8181b7d703fc5bd6732ffecda3c8c /src/include/lib/stringinfo.h
parent39850c7fdb82bd7c64dbb759c5754e29fc0af5f2 (diff)
downloadpostgresql-c02d5b7c27d740830379244db4b9ef111bbf0fc8.tar.gz
postgresql-c02d5b7c27d740830379244db4b9ef111bbf0fc8.zip
Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions.
The style is set to "printf" for backwards compatibility everywhere except on Windows, where it is set to "gnu_printf", which eliminates hundreds of false error messages from modern versions of gcc arising from %m and %ll{d,u} formats.
Diffstat (limited to 'src/include/lib/stringinfo.h')
-rw-r--r--src/include/lib/stringinfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h
index a84988c3f1a..3657a685395 100644
--- a/src/include/lib/stringinfo.h
+++ b/src/include/lib/stringinfo.h
@@ -95,7 +95,7 @@ extern void resetStringInfo(StringInfo str);
extern void
appendStringInfo(StringInfo str, const char *fmt,...)
/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 2, 3)));
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
/*------------------------
* appendStringInfoVA