Re: -Wformat-security warnings generated in gcc build

2014-02-01 Thread Prathamesh Kulkarni
On Sun, Jan 26, 2014 at 3:56 PM, Prathamesh Kulkarni wrote: > On Fri, Jan 24, 2014 at 9:19 PM, Prathamesh Kulkarni > wrote: >> On Thu, Jan 23, 2014 at 9:09 PM, Prathamesh Kulkarni >> wrote: >>> On Thu, Jan 23, 2014 at 8:24 PM, Dodji Seketeli wrote: Prathamesh Kulkarni writes: > >

Re: -Wformat-security warnings generated in gcc build

2014-01-26 Thread Prathamesh Kulkarni
On Fri, Jan 24, 2014 at 9:19 PM, Prathamesh Kulkarni wrote: > On Thu, Jan 23, 2014 at 9:09 PM, Prathamesh Kulkarni > wrote: >> On Thu, Jan 23, 2014 at 8:24 PM, Dodji Seketeli wrote: >>> Prathamesh Kulkarni writes: >>> Shall it be correct then to replace calls to error() and friends, >

Re: -Wformat-security warnings generated in gcc build

2014-01-24 Thread Prathamesh Kulkarni
On Thu, Jan 23, 2014 at 9:09 PM, Prathamesh Kulkarni wrote: > On Thu, Jan 23, 2014 at 8:24 PM, Dodji Seketeli wrote: >> Prathamesh Kulkarni writes: >> >>> >>> Shall it be correct then to replace calls to error() and friends, >>> taking only format string with no-argument specifiers >>> to error_

Re: -Wformat-security warnings generated in gcc build

2014-01-23 Thread Prathamesh Kulkarni
On Thu, Jan 23, 2014 at 8:24 PM, Dodji Seketeli wrote: > Prathamesh Kulkarni writes: > >> >> Shall it be correct then to replace calls to error() and friends, >> taking only format string with no-argument specifiers >> to error_at_no_args() ? (similarly we shall need warning_at_no_args, >> pedwar

Re: -Wformat-security warnings generated in gcc build

2014-01-23 Thread Dodji Seketeli
Prathamesh Kulkarni writes: > > Shall it be correct then to replace calls to error() and friends, > taking only format string with no-argument specifiers > to error_at_no_args() ? (similarly we shall need warning_at_no_args, > pedwarn_no_args, etc.) I would guess so, yes. >> >> Also, you'd need

Re: -Wformat-security warnings generated in gcc build

2014-01-23 Thread Prathamesh Kulkarni
On Thu, Jan 23, 2014 at 5:02 PM, Dodji Seketeli wrote: > "Joseph S. Myers" a écrit: > >> On Wed, 22 Jan 2014, Prathamesh Kulkarni wrote: >> >>> Unfortunately, I am not clear on how to check for format specifiers in >>> string. >>> Should I do it manually by checking the format string for specifi

Re: -Wformat-security warnings generated in gcc build

2014-01-23 Thread Trevor Saunders
On Thu, Jan 23, 2014 at 12:32:34PM +0100, Dodji Seketeli wrote: > "Joseph S. Myers" a écrit: > > > On Wed, 22 Jan 2014, Prathamesh Kulkarni wrote: > > > >> Unfortunately, I am not clear on how to check for format specifiers in > >> string. > >> Should I do it manually by checking the format stri

Re: -Wformat-security warnings generated in gcc build

2014-01-23 Thread Dodji Seketeli
"Joseph S. Myers" a écrit: > On Wed, 22 Jan 2014, Prathamesh Kulkarni wrote: > >> Unfortunately, I am not clear on how to check for format specifiers in >> string. >> Should I do it manually by checking the format string for specifiers >> and call abort if found a no-argument specifier, >> or is

Re: -Wformat-security warnings generated in gcc build

2014-01-22 Thread Joseph S. Myers
On Wed, 22 Jan 2014, Prathamesh Kulkarni wrote: > Unfortunately, I am not clear on how to check for format specifiers in string. > Should I do it manually by checking the format string for specifiers > and call abort if found a no-argument specifier, > or is there a better way to do it ? I'll lea

Re: -Wformat-security warnings generated in gcc build

2014-01-22 Thread Prathamesh Kulkarni
On Tue, Jan 21, 2014 at 11:20 PM, Joseph S. Myers wrote: > On Tue, 21 Jan 2014, Prathamesh Kulkarni wrote: > >> Souce of these warnings are typically calls to error() and friends. >> In C and C++ front ends there are many calls of error (errmsg). >> errmsg is in many cases, assigned the return va

Re: -Wformat-security warnings generated in gcc build

2014-01-21 Thread Florian Weimer
On 01/21/2014 06:50 PM, Joseph S. Myers wrote: On Tue, 21 Jan 2014, Prathamesh Kulkarni wrote: Souce of these warnings are typically calls to error() and friends. In C and C++ front ends there are many calls of error (errmsg). errmsg is in many cases, assigned the return value of targetm hooks

Re: -Wformat-security warnings generated in gcc build

2014-01-21 Thread Joseph S. Myers
On Tue, 21 Jan 2014, Prathamesh Kulkarni wrote: > Souce of these warnings are typically calls to error() and friends. > In C and C++ front ends there are many calls of error (errmsg). > errmsg is in many cases, assigned the return value of targetm hooks > (tagetm.invalid_return_type(), etc.) Is

Re: -Wformat-security warnings generated in gcc build

2014-01-21 Thread Jakub Jelinek
On Tue, Jan 21, 2014 at 09:09:25PM +0530, Prathamesh Kulkarni wrote: > --- gcc/c/c-convert.c (revision 206867) > +++ gcc/c/c-convert.c (working copy) > @@ -79,7 +79,7 @@ convert (tree type, tree expr) >if ((invalid_conv_diag > = targetm.invalid_conversion (TREE_TYPE (expr), type))) >