From c02d5b7c27d740830379244db4b9ef111bbf0fc8 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Thu, 28 Apr 2011 10:56:14 -0400 Subject: 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. --- src/bin/pg_ctl/pg_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/pg_ctl/pg_ctl.c') diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 98de19fa381..98bbaefd8c8 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -115,7 +115,7 @@ static void write_stderr(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 *pg_malloc(size_t size); static char *xstrdup(const char *s); static void do_advice(void); -- cgit v1.2.3