From 203e0667d21953737537d1991ec76b768fe588ae Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 16 Dec 2024 22:38:24 -0500 Subject: hw/xfree86: Fix -Wincompatible-pointer-types sbus compile failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ../hw/xfree86/common/xf86sbusBus.c: In function ‘xf86SbusConfigureNewDev’: ../hw/xfree86/common/xf86sbusBus.c:751:21: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type [-Wincompatible-pointer-types] 751 | XNFasprintf(&GDev->busID, "SBUS:%s", promPath); | ^~~~~~~~~~~~ | | | const char ** ``` Apply the same fix as in commit e1e01d2e3 ("xfree86/common: Warning fixes. Mostly const string handling.") (cherry picked from commit bdacb100bf6a551bc9045f7f0048cbb99eb3db5a) Part-of: --- hw/xfree86/common/xf86sbusBus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index a4b114af0..ae4e45773 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -740,6 +740,7 @@ void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev) { char *promPath = NULL; + char *tmp; sBus = (sbusDevicePtr) busData; GDev->identifier = sBus->descr; @@ -748,10 +749,11 @@ xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev) sparcPromClose(); } if (promPath) { - XNFasprintf(&GDev->busID, "SBUS:%s", promPath); + XNFasprintf(&tmp, "SBUS:%s", promPath); free(promPath); } else { - XNFasprintf(&GDev->busID, "SBUS:fb%d", sBus->fbNum); + XNFasprintf(&tmp, "SBUS:fb%d", sBus->fbNum); } + GDev->busID = tmp; } -- cgit v1.2.3