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

From alanwli@gmail.com
Subject Re: Fixes for compiler warnings
Date
Msg-id 00163646c1e6e03c2e0460bc6f6b@google.com
Whole thread Raw
In response to Fixes for compiler warnings  (Alan Li <alanwli@gmail.com>)
List pgsql-hackers
On Jan 17, 2009 3:34pm, Peter Eisentraut <peter_e@gmx.net> wrote:<br />> On Saturday 17 January 2009 11:44:07
AlanLi wrote:<br />> <br />> > Attached are patches to fix the following compiler warnings that I see when<br
/>><br />> > using gcc 4.3.2.<br />> <br />> ><br />> <br />> > MASTER warning:<br />>
<br/>> > tablecmds.c: In function 'DropErrorMsgWrongType':<br />> <br />> > tablecmds.c:601: warning:
formatnot a string literal and no format<br />> <br />> > arguments<br />> <br />> ><br />> <br
/>>> REL8_3_STABLE warnings:<br />> <br />> > utility.c: In function 'DropErrorMsgWrongType':<br />>
<br/>> > utility.c:129: warning: format not a string literal and no format arguments<br />> <br />> >
trigger.c:In function 'ConvertTriggerToFK':<br />> <br />> > trigger.c:600: warning: format not a string
literaland no format arguments<br />> <br />> > trigger.c:616: warning: format not a string literal and no
formatarguments<br />> <br />> > trigger.c:628: warning: format not a string literal and no format
arguments<br/>> <br />> > guc.c: In function 'set_config_option':<br />> <br />> > guc.c:4424:
warning:format not a string literal and no format arguments<br />> <br />> > describe.c: In function
'describeOneTableDetails':<br/>> <br />> > describe.c:1294: warning: format not a string literal and no
format<br/>> <br />> > arguments<br />> <br />> <br />> <br />> You apparently have your compiler
configuredwith -Wformat-security.  Our code<br />> <br />> doesn't do that.  I think the cases the warning
complainsabout are fine and<br />> <br />> the way the warning is designed is a bit bogus.<br />> <br /><br
/>Yeah,you're right. I'm using gcc 4.3.2 on Ubuntu 8.10, which uses -Wformat-security by default.<br /><br />Alan 

pgsql-hackers by date:

Previous
From: Grzegorz Jaskiewicz
Date:
Subject: Re: Fixes for compiler warnings
Next
From: "Brendan Jurd"
Date:
Subject: Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)