discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSIMap and OpenBSD (Was: Re: GSIMap and gcc 2.95)


From: Fred Kiefer
Subject: Re: GSIMap and OpenBSD (Was: Re: GSIMap and gcc 2.95)
Date: Wed, 17 Aug 2011 08:56:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 17.08.2011 00:19, Riccardo Mottola wrote:
If you replace the NULL with (void*)0 in GSIMap.h, does that fix it?

Fred suggested to write the macro as
#define GSI_MAP_CLEAR_VAL(node) GSI_MAP_WRITE_VAL(map, &node->value,
(GSIMapVal)(void *)NULL)

If I try
#define GSI_MAP_CLEAR_VAL(node) GSI_MAP_WRITE_VAL(map, &node->value,
(GSIMapVal)(void *)0)

It still compiles. What fix do you consider better ?

I prefer the first one. On systems with a well defined NULL we just have a redundant type cast and on the others we at least express that we want to deal with NULL. For the compiler it should be all the same.



reply via email to

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