[GRASS-dev] [grass-code I][455] r.proj segfaults after Jul 14
changes
Brad Douglas
rez at touchofmadness.com
Thu Aug 9 13:52:54 EDT 2007
On Thu, 2007-08-09 at 09:27 -0500, William Kyngesburye wrote:
> On Aug 9, 2007, at 1:57 AM, Brad Douglas wrote:
>
> >> Not to mention the other modules I found null messages in, as I
> >> mentioned in a followup to the bug report.
> >>
> >> If (NULL) is indeed improper use of the message functions, I could
> >> take care of them - I have my own CVS copy of r.proj.seg updated
> >> already, and I found those others already.
> >
> > That is blatantly wrong. Does anyone actually test code they write?
> > Please commit your changes. I'll update the documentation.
> >
> That's interesting, because when I looked at the r.proj main.c
> history, the "Message/Debug cleaning" revision explicitly changed a
> couple G_message("") to G_message(NULL) (among other changes).
This is cause for some concern. If unsure, glance at the function code.
It would have been more than obvious.
> To be fair, it may be that it worked for them (it only seems to cause
> trouble on OSX). They may or may not *know* if it's wrong (I didn't,
> tho I understood what it was meant to do).
Not all NULLs are treated equally by all systems. Turning -Wall on
should have revealed it, too. It may have been an honest mistake, but
it was a careless mistake.
> Anyways, I've changed all the NULL messages I found in CVS now.
Thank you. I updated the documentation this morning to explicitly warn
against it.
--
Brad Douglas <rez touchofmadness com> KB8UYR/6
Address: 37.493,-121.924 / WGS84 National Map Corps #TNMC-3785
More information about the grass-dev
mailing list