Suppress a bunch of compiler warnings for using constant strings

This commit is contained in:
matthieu 2014-07-13 15:12:53 +00:00
parent c8694adcb4
commit 1a9113d15c

View File

@ -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;