-Wformat-zero-length - Mailing list pgsql-hackers

From Peter Eisentraut
Subject -Wformat-zero-length
Date
Msg-id 1310072121.31709.13.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: -Wformat-zero-length
List 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?




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SSI atomic commit
Next
From: Dan Ports
Date:
Subject: Re: SSI atomic commit