Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8648) Bool and type related cleanups
Home

[Freeciv-Dev] Re: (PR#8648) Bool and type related cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8648) Bool and type related cleanups
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 2 May 2004 06:02:20 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >

Raimar Falke wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
> 
> On Sun, May 02, 2004 at 02:56:51AM -0700, Marko Lindqvist wrote:
> 
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
>>
>>Raimar Falke wrote:
>>
>>
>>>Found by splint.
>>>
>>>Highlight:
>>>-  return FALSE;
>>>+  return NULL;
>>>
>>>I wonder why this wasn't found by gcc.
>>>
>>
>>  Both are preprocessor macros with same definition: '0'. (For some 
>>systems NULL is defined as '(void) 0', though) Actual compiler never 
>>sees them.
> 
> 
> The compiler should bring a warning if I want to use "0" (aka FALSE)
> as a pointer.
> 

  It would be nice, but simply don't work. You have to be able to use 
NULL as pointer, and it _too_ is "0".

 > grep -r "#define NULL" /usr/include/


  - Caz




[Prev in Thread] Current Thread [Next in Thread]