xwin: fix NULL parameter in printf arguments
> ../hw/xwin/winprefs.c:625:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=] > 625 | ErrorF("LoadPreferences: %s not found\n", path); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
deee51a5ff
commit
59a3df5645
|
@ -611,15 +611,12 @@ winIconIsOverride(HICON hicon)
|
|||
|
||||
/*
|
||||
* Open and parse the XWinrc config file @path.
|
||||
* If @path is NULL, use the built-in default.
|
||||
* @path must not be NULL
|
||||
*/
|
||||
static int
|
||||
winPrefsLoadPreferences(const char *path)
|
||||
{
|
||||
FILE *prefFile = NULL;
|
||||
|
||||
if (path)
|
||||
prefFile = fopen(path, "r");
|
||||
FILE *prefFile = fopen(path, "r");
|
||||
|
||||
if (!prefFile) {
|
||||
ErrorF("LoadPreferences: %s not found\n", path);
|
||||
|
@ -684,7 +681,6 @@ LoadPreferences(void)
|
|||
if (!parsed) {
|
||||
ErrorF
|
||||
("LoadPreferences: See \"man XWinrc\" to customize the XWin menu.\n");
|
||||
parsed = winPrefsLoadPreferences(NULL);
|
||||
}
|
||||
|
||||
/* Setup a DISPLAY environment variable, need to allocate on heap */
|
||||
|
|
Loading…
Reference in New Issue