Re: Fixes for compiler warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixes for compiler warnings
Date
Msg-id 23977.1232260131@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixes for compiler warnings  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Fixes for compiler warnings  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> There's an argument to be made that the code is easier to audit if you put the
> "%s" format string in explicitly too.

Yeah, the risk this is trying to guard against is variables containing
"%" unexpectedly.  Even if that's not possible, it requires some work
to verify and it's a bit fragile.  I didn't look at the specific cases
yet but in general I think this is a good policy.

One thing to watch out for is that the intention may have been to allow
the strings to be translated.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Statement-level triggers and inheritance
Next
From: Peter Eisentraut
Date:
Subject: Re: Statement-level triggers and inheritance