[GRASS-dev] Re: [GRASS-SVN] r45195 - grass/branches/releasebranch_6_4/raster/r.proj.seg

Markus Metz markus.metz.giswork at googlemail.com
Wed Jan 26 12:47:02 EST 2011


On Wed, Jan 26, 2011 at 6:32 PM, Martin Landa <landa.martin at gmail.com> wrote:
> 2011/1/26  <svn_grass at osgeo.org>:
>> Author: mmetz
>> Date: 2011-01-26 09:21:48 -0800 (Wed, 26 Jan 2011)
>> New Revision: 45195
>>
>> Modified:
>>   grass/branches/releasebranch_6_4/raster/r.proj.seg/main.c
>> Log:
>> fix for #1262
>
> excellent catch up Markus! Would be better to modify G_message() to
> allow usage G_message(NULL) for printing empty lines?
>
IMHO no. Empty lines can be printed with G_message("") (or G_message("
") to avoid compiler warnings). G_message(NULL) occured only in
r.proj.seg (also in deactivated r.proj), but nowhere else in the code
base. The purpose of G_message() is to print a string, and "" is a
valid empty string, should be the same as "\0", whereas I regard
passing NULL as a string as pointer abuse.

Anyway, since there is no other G_message(NULL), I don't see a need to
touch G_message() or vfprint_error(). Rather modify modules than
libraries, less impact if it is only one module.

Markus M


More information about the grass-dev mailing list