[PATCH] Fixes sentinel warnings on GCC4
Chris Shoemaker
c.shoemaker at cox.net
Mon Dec 5 16:34:58 EST 2005
On Sun, Dec 04, 2005 at 02:45:42PM +0100, Sjoerd Langkemper wrote:
> This patch fixes warnings like these:
> warning: missing sentinel in function call
>
> Look at this page to find at what this warning is about:
> http://www.linuxonly.nl/docs/sentinel/
>
> This patch basically replaces NULL with (char *)NULL in functions which
> are NULL-terminated. Maybe it is a good idea to define a constant for
> (char *)NULL, but I don't know where that would be defined.
>
> Sjoerd
Patch looks right except for some of :
+ new_map = g_strconcat(map, accel_key, (gchar *)(char *)NULL);
(I think I saw about 5.)
and several uses in comparisons instead of variadics:
+(clean_url != (char *)NULL) ? (char const *)clean_url : url,
which are not needed or desirable.
BTW, there's a small error in the explanation at the website. "NULL"
as argument to variadic function is not typed (void *). (If it were,
there wouldn't be a problem here, err at least not *this* problem. :)
A resubmission would be greatly appreciated. Thanks.
-chris
Meta-comment for list maintainer:
Can we please set ReplyTo on -patches mail to be gnucash-devel?
More information about the gnucash-devel
mailing list