mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
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.
This commit is contained in:
@@ -141,7 +141,7 @@ extern int enlargePQExpBuffer(PQExpBuffer str, size_t needed);
|
||||
extern void
|
||||
printfPQExpBuffer(PQExpBuffer 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)));
|
||||
|
||||
/*------------------------
|
||||
* appendPQExpBuffer
|
||||
@@ -153,7 +153,7 @@ __attribute__((format(printf, 2, 3)));
|
||||
extern void
|
||||
appendPQExpBuffer(PQExpBuffer 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)));
|
||||
|
||||
/*------------------------
|
||||
* appendPQExpBufferStr
|
||||
|
Reference in New Issue
Block a user