-Wformat-zero-length

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: -Wformat-zero-length
Date: 2011-07-07 20:55:21
Message-ID: 1310072121.31709.13.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was adding gcc printf attributes to more functions in obscure places,
and now I'm seeing this in pg_upgrade:

relfilenode.c:72:2: warning: zero-length gnu_printf format string [-Wformat-zero-length]

So the options I can see are either adding the compiler option
-Wno-format-zero-length (with configure check and all), or hack up the
code to do something like this instead: Before:

prep_status("");

After:

prep_status("%s", "");

Comments?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-07-07 21:04:41 Re: SSI atomic commit
Previous Message Tom Lane 2011-07-07 20:48:55 Re: SSI atomic commit