mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +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:
@@ -36,7 +36,7 @@ extern bool setQFout(const char *fname);
|
||||
extern void
|
||||
psql_error(const char *fmt,...)
|
||||
/* This lets gcc check the format string for consistency. */
|
||||
__attribute__((format(printf, 1, 2)));
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
|
||||
|
||||
extern void NoticeProcessor(void *arg, const char *message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user