please help with: warning: initialization makes integer from pointer

Mike Hunter mhunter at ack.Berkeley.EDU
Fri Oct 8 09:14:42 PDT 2004


On Oct 08, "Harti Brandt" wrote:

> On Fri, 8 Oct 2004, Dan Nelson wrote:
> 
> Memset is actually not portable if the structure contains pointers because 
> it would initialize the pointers to 0 values not to 0 pointers. A 0 
> pointer not necessarily has a 0 value. A pointer can be portably be 
> initialize to the 0-pointer only by assigning NULL (or 0) (or by assigning 
> another pointer that is alreay initialized).

Sick!

Are there actually systems out there that don't have "all-zero" NULL pointers?

You have officially shattered my previously held beliefs about the
sacredness of memset :(

Mike


More information about the freebsd-hackers mailing list