diff options
author | Andrew Dunstan | 2011-04-28 14:56:14 +0000 |
---|---|---|
committer | Andrew Dunstan | 2011-04-28 14:56:14 +0000 |
commit | c02d5b7c27d740830379244db4b9ef111bbf0fc8 (patch) | |
tree | f1de6c2b7db8181b7d703fc5bd6732ffecda3c8c /src/test | |
parent | 39850c7fdb82bd7c64dbb759c5754e29fc0af5f2 (diff) |
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/test')
-rw-r--r-- | src/test/regress/pg_regress.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 23ef0a94e5d..1411ca4e400 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -126,17 +126,17 @@ static void header(const char *fmt,...) /* This extension allows gcc to check the format string for consistency with the supplied arguments. */ -__attribute__((format(printf, 1, 2))); +__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2))); static void status(const char *fmt,...) /* This extension allows gcc to check the format string for consistency with the supplied arguments. */ -__attribute__((format(printf, 1, 2))); +__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2))); static void psql_command(const char *database, const char *query,...) /* This extension allows gcc to check the format string for consistency with the supplied arguments. */ -__attribute__((format(printf, 2, 3))); +__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3))); #ifdef WIN32 typedef BOOL (WINAPI * __CreateRestrictedToken) (HANDLE, DWORD, DWORD, PSID_AND_ATTRIBUTES, DWORD, PLUID_AND_ATTRIBUTES, DWORD, PSID_AND_ATTRIBUTES, PHANDLE); |