[Monetdb-developers] Signed/unsigned and NULL

Fabian Groffen Fabian.Groffen at cwi.nl
Tue Oct 24 10:22:17 CEST 2006


Never mind

On 24-10-2006 10:16:11 +0200, Fabian Groffen wrote:
> I just figured that the following yields in a signed/unsigned warning:
> 
>  1  void myfunc(char *s) {
>  2   if (s != NULL) {
>  3      ...
>  4    }
>  5  }
> 
> The error occurs on line 2.  I cannot find the definition of NULL, but I
> suspect it is defined like:
> #define NULL 0
> 
> Obviously 0 is signed while s (pointer) is not.  Maybe we should use
> #define NULL (char*)0
> instead?




More information about the developers-list mailing list