Re: [COMMITTERS] pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-committers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.
Date: 2013-03-25 13:36:18
Message-ID: 11348.1364218578@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> writes:
> Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.
> Per warning from -Wmissing-format-attribute.

Hm, this is exactly what I removed yesterday, because it makes the build
fail outright on old gcc:

gcc -O1 -Wall -Wmissing-prototypes -Wpointer-arith -Wformat-security -fno-strict-aliasing -g -I../../../src/interfaces/libpq -I../../../src/include -D_XOPEN_SOURCE_EXTENDED -D_USE_CTYPE_MACROS -c -o pg_dump.o pg_dump.c
In file included from pg_backup.h:29,
from pg_backup_archiver.h:32,
from pg_dump.c:60:
dumputils.h:48: argument format specified for non-function `on_exit_msg_func'
make: *** [pg_dump.o] Error 1

Perhaps we have to refactor to avoid the use of a function variable
here. It didn't seem particularly critical to do it like that rather
than with, say, a bool.

Or maybe we should turn off that warning. It seems to be leaping to
conclusions about what the usage of the function variable is.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-03-25 15:06:25 Re: pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.
Previous Message Heikki Linnakangas 2013-03-25 08:11:14 pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-03-25 13:51:45 Re: Enabling Checksums
Previous Message Tom Lane 2013-03-25 13:30:00 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)