From 0f230584d0010bfd892de41e528892a476f37f20 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 22 Jul 2025 18:32:56 +0200 Subject: [PATCH] xfree86: drivers: fbdev: constify retvals from xf86FindOptionValue() xf86FindOptionValue() returns `const char*`, so the target variables also need to be const. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/drivers/video/fbdev/src/fbdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/drivers/video/fbdev/src/fbdev.c b/hw/xfree86/drivers/video/fbdev/src/fbdev.c index 9474eb2bea..19f21d87cf 100644 --- a/hw/xfree86/drivers/video/fbdev/src/fbdev.c +++ b/hw/xfree86/drivers/video/fbdev/src/fbdev.c @@ -263,11 +263,10 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num, pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, NULL, NULL, NULL, NULL, NULL); if (pScrn) { - char *device; GDevPtr devSection = xf86GetDevFromEntity(pScrn->entityList[0], pScrn->entityInstanceList[0]); - device = xf86FindOptionValue(devSection->options, "fbdev"); + const char *device = xf86FindOptionValue(devSection->options, "fbdev"); if (fbdevHWProbe(dev, device, NULL)) { pScrn->driverVersion = FBDEV_VERSION; pScrn->driverName = FBDEV_DRIVER_NAME; @@ -307,7 +306,6 @@ FBDevProbe(DriverPtr drv, int flags) #ifndef XSERVER_LIBPCIACCESS int bus,device,func; #endif - char *dev; Bool foundScreen = FALSE; TRACE("probe start"); @@ -325,7 +323,7 @@ FBDevProbe(DriverPtr drv, int flags) for (i = 0; i < numDevSections; i++) { Bool isPci = FALSE; - dev = xf86FindOptionValue(devSections[i]->options,"fbdev"); + const char *dev = xf86FindOptionValue(devSections[i]->options,"fbdev"); if (devSections[i]->busID) { #ifndef XSERVER_LIBPCIACCESS if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device,