From 1a9113d15c343e9dac1ab6b9d29828cdcde1c75b Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 13 Jul 2014 15:12:53 +0000 Subject: [PATCH] Suppress a bunch of compiler warnings for using constant strings --- driver/xf86-video-wsfb/src/wsfb_driver.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/driver/xf86-video-wsfb/src/wsfb_driver.c b/driver/xf86-video-wsfb/src/wsfb_driver.c index 0463a4dcd..f81130664 100644 --- a/driver/xf86-video-wsfb/src/wsfb_driver.c +++ b/driver/xf86-video-wsfb/src/wsfb_driver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfb_driver.c,v 1.35 2014/07/13 14:09:14 matthieu Exp $ */ +/* $OpenBSD: wsfb_driver.c,v 1.36 2014/07/13 15:12:53 matthieu Exp $ */ /* * Copyright © 2001-2012 Matthieu Herrb * All rights reserved. @@ -153,7 +153,7 @@ static int pix24bpp = 0; _X_EXPORT DriverRec WSFB = { WSFB_VERSION, - WSFB_DRIVER_NAME, + (char *)WSFB_DRIVER_NAME, WsfbIdentify, WsfbProbe, WsfbAvailableOptions, @@ -366,8 +366,8 @@ WsfbProbe(DriverPtr drv, int flags) if (pScrn != NULL) { foundScreen = TRUE; pScrn->driverVersion = WSFB_VERSION; - pScrn->driverName = WSFB_DRIVER_NAME; - pScrn->name = WSFB_NAME; + pScrn->driverName = (char *)WSFB_DRIVER_NAME; + pScrn->name = (char *)WSFB_NAME; pScrn->Probe = WsfbProbe; pScrn->PreInit = WsfbPreInit; pScrn->ScreenInit = WsfbScreenInit; @@ -587,7 +587,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) /* Color weight */ if (pScrn->depth > 8) { - rgb zeros = { 0, 0, 0 }, masks; + rgb izeros = { 0, 0, 0 }, masks; switch (fPtr->wstype) { case WSDISPLAY_TYPE_SUN24: @@ -638,7 +638,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) break; } - if (!xf86SetWeight(pScrn, zeros, masks)) + if (!xf86SetWeight(pScrn, izeros, masks)) return FALSE; } @@ -662,7 +662,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) pScrn->rgbBits = 6; else pScrn->rgbBits = 8; - pScrn->chipset = "wsfb"; + pScrn->chipset = (char *)"wsfb"; pScrn->videoRam = fPtr->linebytes * fPtr->info.height; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Vidmem: %dk\n", @@ -725,7 +725,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) mode = (DisplayModePtr)malloc(sizeof(DisplayModeRec)); mode->prev = mode; mode->next = mode; - mode->name = "wsfb current mode"; + mode->name = (char *)"wsfb current mode"; mode->status = MODE_OK; mode->type = M_T_BUILTIN; mode->Clock = 0;