mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
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.
This commit is contained in:
@@ -585,7 +585,7 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
pat = FcPatternCreate();
|
pat = FcPatternCreate();
|
||||||
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, 0);
|
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
|
||||||
fs = FcFontList(0, pat, os);
|
fs = FcFontList(0, pat, os);
|
||||||
if (!fs) {
|
if (!fs) {
|
||||||
WMRunAlertPanel(scr, panel->win, _("Error"),
|
WMRunAlertPanel(scr, panel->win, _("Error"),
|
||||||
|
|||||||
Reference in New Issue
Block a user