From 4aa6d3e4fdc0a4bbda314adaf0adc66c68e7b0eb Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 21 Nov 2025 13:44:08 +0100 Subject: [PATCH] xfree86: loader: fix NULL warning on LogMessage() call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > ../hw/xfree86/loader/loadmod.c: In function ‘LoaderSetPath’: > ../hw/xfree86/loader/loadmod.c:230:67: warning: ‘%s’ directive argument is null [-Wformat-overflow=] > 230 | LogMessage(X_ERROR, "Failed to store module search path \"%s\" for module %s\n", path, driver); > | ^~ Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/loader/loadmod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index dca684f989..1d1bc9c04c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -227,7 +227,8 @@ LoaderSetPath(const char *driver, const char *path) if (item && item->name && (!path || item->paths)) xorg_list_add(&item->entry, &modulePathLists); else { - LogMessage(X_ERROR, "Failed to store module search path \"%s\" for module %s\n", path, driver); + LogMessage(X_ERROR, "Failed to store module search path \"%s\" for module %s\n", + path ? path : "", driver); if (item) { if (item->name) free(item->name); if (item->paths) FreeStringList(item->paths);