[Monetdb-developers] Signed/unsigned and NULL

Fabian Groffen Fabian.Groffen at cwi.nl
Tue Oct 24 10:16:11 CEST 2006

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

More information about the developers-list mailing list