[GRASS-dev] [GRASS-SVN] r52607 - grass/trunk/raster/r.lake
markus.metz.giswork at gmail.com
Fri Aug 10 03:20:26 PDT 2012
On Fri, Aug 10, 2012 at 11:44 AM, Martin Landa <landa.martin at gmail.com> wrote:
> 2012/8/10 Markus Neteler <neteler at osgeo.org>:
>>> If this is a real problem, why fix the symptoms and not the cause?
>>> That would probably be the macro defining _().
>> It worked for the past 10-xx years, so I don't see a reason why
>> messing up the code when one specific gcc version complains.
> agreed, in any case such changes should be discussed in ML before
> applying them in SVN.
> grep "G_fatal_error(\"%s\", _(" * -R --include=*.c -l
My compile flags are -Wall -Wextra -fno-common -fexceptions
These are not enough to trigger the warnings, the gcc 4.6.3 I use
needs at least one of
-Wall -Wformat -Wno-format-extra-args -Wformat-security
With regard to r.lake, the warnings seem to be bogus because the
contents of the message strings are out of user control.
If these warnings should be fixed, I guess the right place is either
fixing the _ macro or G_message(), G_warning(), G_fatal_error(). Any
user input always goes first through the parser, thus the parser could
be modified and afterwards the extra format-related -W flags are no
In any case it seems to me that fixing that for every instance of
G_message(), G_warning(), G_fatal_error() and any print functions is
not really feasible.
More information about the grass-dev