From 7a84127a275c2f72dbc162830b4fbb366aa48b6d Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Mon, 17 Aug 2009 18:13:58 +0200 Subject: [PATCH] Fix improper use of function sentinel This patch addresses this warning of gcc: wfontpanel.c: In function 'listFamilies': wfontpanel.c:588: warning: missing sentinel in function call Fix it by using the 'NULL' pointer instead of 0 (zero) as the sentinel. For more information, see http://www.linuxonly.nl/docs/2/2_GCC_4_warnings_about_sentinels.html in particular, "On most systems, there is no difference between 0 and (char *)0. On 64 bit systems, however, the integer 0 is 32 bits and the pointer 0 is 64 bits. The compiler does not know whether it is an integer or a pointer, and defaults for the integer. This will not clear the upper 32 bits and the function will not stop scanning its parameters." Note that here in my 64-bit Mandriva I don't need to cast (char *)NULL. --- WINGs/wfontpanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WINGs/wfontpanel.c b/WINGs/wfontpanel.c index 537e54dd..c03a7792 100644 --- a/WINGs/wfontpanel.c +++ b/WINGs/wfontpanel.c @@ -585,7 +585,7 @@ listFamilies(WMScreen *scr, WMFontPanel *panel) int i; pat = FcPatternCreate(); - os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, 0); + os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); fs = FcFontList(0, pat, os); if (!fs) { WMRunAlertPanel(scr, panel->win, _("Error"),