summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-30 13:19:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-30 13:26:14 +0100
commit208282d31657f2b718e151397d16b307cdf8f77b (patch)
tree14bedb1393d638bc6920bff68f948b9bb64af200
parent7e3445a330340c1aa2ca5a13d838344438336749 (diff)
Suppress a bunch of compiler warnings for using constant strings
We want these allocated in ro memory even if the antique API complains. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_module.c8
-rw-r--r--src/sna/sna_display.c10
-rw-r--r--src/sna/sna_video_hwmc.c2
-rw-r--r--src/sna/sna_video_overlay.c30
-rw-r--r--src/sna/sna_video_sprite.c10
-rw-r--r--src/sna/sna_video_textured.c14
6 files changed, 37 insertions, 37 deletions
diff --git a/src/intel_module.c b/src/intel_module.c
index 3c52c0f5..47e494c3 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -302,7 +302,7 @@ intel_detect_chipset(ScrnInfoPtr scrn,
name);
}
- scrn->chipset = name;
+ scrn->chipset = (char *)name;
}
/*
@@ -442,8 +442,8 @@ intel_scrn_create(DriverPtr driver,
return FALSE;
scrn->driverVersion = INTEL_VERSION;
- scrn->driverName = INTEL_DRIVER_NAME;
- scrn->name = INTEL_NAME;
+ scrn->driverName = (char *)INTEL_DRIVER_NAME;
+ scrn->name = (char *)INTEL_NAME;
scrn->driverPrivate = (void *)(match_data | 1);
scrn->Probe = NULL;
@@ -569,7 +569,7 @@ intel_available_options(int chipid, int busid)
static DriverRec intel = {
INTEL_VERSION,
- INTEL_DRIVER_NAME,
+ (char *)INTEL_DRIVER_NAME,
intel_identify,
NULL,
intel_available_options,
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 7e47e738..17e2de15 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -655,11 +655,11 @@ done:
sna_output->backlight_max = sna_output_backlight_get_max(output);
sna_output->backlight_active_level = sna_output_backlight_get(output);
switch (best_type) {
- case INT_MAX: best_iface = "user"; from = X_CONFIG; break;
- case FIRMWARE: best_iface = "firmware"; break;
- case PLATFORM: best_iface = "platform"; break;
- case RAW: best_iface = "raw"; break;
- default: best_iface = "unknown"; break;
+ case INT_MAX: best_iface = (char *)"user"; from = X_CONFIG; break;
+ case FIRMWARE: best_iface = (char *)"firmware"; break;
+ case PLATFORM: best_iface = (char *)"platform"; break;
+ case RAW: best_iface = (char *)"raw"; break;
+ default: best_iface = (char *)"unknown"; break;
}
xf86DrvMsg(output->scrn->scrnIndex, from,
"found backlight control interface %s (type '%s')\n",
diff --git a/src/sna/sna_video_hwmc.c b/src/sna/sna_video_hwmc.c
index 2a9fd065..4010b81c 100644
--- a/src/sna/sna_video_hwmc.c
+++ b/src/sna/sna_video_hwmc.c
@@ -256,7 +256,7 @@ void sna_video_xvmc_setup(struct sna *sna, ScreenPtr screen)
sna->PciInfo->domain,
sna->PciInfo->bus, sna->PciInfo->dev, sna->PciInfo->func);
- xf86XvMCRegisterDRInfo(screen, SNA_XVMC_LIBNAME, bus,
+ xf86XvMCRegisterDRInfo(screen, (char *)SNA_XVMC_LIBNAME, bus,
SNA_XVMC_MAJOR, SNA_XVMC_MINOR,
SNA_XVMC_PATCHLEVEL);
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index 9020b9b2..a0b4db9b 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -60,19 +60,19 @@ static Atom xvSyncToVblank;
static XvFormatRec Formats[] = { {15}, {16}, {24} };
static const XvAttributeRec Attributes[] = {
- {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"},
- {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
- {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
- {XvSettable | XvGettable, 0, 1023, "XV_SATURATION"},
- {XvSettable | XvGettable, -1, 1, "XV_PIPE"},
+ {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"},
+ {XvSettable | XvGettable, -128, 127, (char *)"XV_BRIGHTNESS"},
+ {XvSettable | XvGettable, 0, 255, (char *)"XV_CONTRAST"},
+ {XvSettable | XvGettable, 0, 1023, (char *)"XV_SATURATION"},
+ {XvSettable | XvGettable, -1, 1, (char *)"XV_PIPE"},
#define NUM_ATTRIBUTES 5
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA0"},
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA1"},
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA2"},
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA3"},
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA4"},
- {XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA5"}
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA0"},
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA1"},
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA2"},
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA3"},
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA4"},
+ {XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_GAMMA5"}
#define GAMMA_ATTRIBUTES 6
};
@@ -703,12 +703,12 @@ void sna_video_overlay_setup(struct sna *sna, ScreenPtr screen)
adaptor->type = XvInputMask | XvImageMask;
adaptor->pScreen = screen;
- adaptor->name = "Intel(R) Video Overlay";
+ adaptor->name = (char *)"Intel(R) Video Overlay";
adaptor->nEncodings = 1;
adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
adaptor->pEncodings[0].id = 0;
adaptor->pEncodings[0].pScreen = screen;
- adaptor->pEncodings[0].name = "XV_IMAGE";
+ adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
adaptor->pEncodings[0].width = sna->kgem.gen < 021 ? IMAGE_MAX_WIDTH_LEGACY : IMAGE_MAX_WIDTH;
adaptor->pEncodings[0].height = sna->kgem.gen < 021 ? IMAGE_MAX_HEIGHT_LEGACY : IMAGE_MAX_HEIGHT;
adaptor->pEncodings[0].rate.numerator = 1;
@@ -719,9 +719,9 @@ void sna_video_overlay_setup(struct sna *sna, ScreenPtr screen)
adaptor->nAttributes = NUM_ATTRIBUTES;
if (HAS_GAMMA(sna))
adaptor->nAttributes += GAMMA_ATTRIBUTES;
- adaptor->pAttributes = Attributes;
+ adaptor->pAttributes = (XvAttributeRec *)Attributes;
adaptor->nImages = ARRAY_SIZE(Images);
- adaptor->pImages = Images;
+ adaptor->pImages = (XvImageRec *)Images;
adaptor->ddAllocatePort = sna_xv_alloc_port;
adaptor->ddFreePort = sna_xv_free_port;
adaptor->ddPutVideo = NULL;
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index 05d61298..71482539 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -53,7 +53,7 @@ static Atom xvColorKey;
static XvFormatRec formats[] = { {15}, {16}, {24} };
static const XvImageRec images[] = { XVIMAGE_YUY2, XVIMAGE_UYVY, XVMC_YUV };
static const XvAttributeRec attribs[] = {
- { XvSettable | XvGettable, 0, 0xffffff, "XV_COLORKEY" },
+ { XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_COLORKEY" },
};
static int sna_video_sprite_stop(ClientPtr client,
@@ -479,12 +479,12 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen)
adaptor->type = XvInputMask | XvImageMask;
adaptor->pScreen = screen;
- adaptor->name = "Intel(R) Video Sprite";
+ adaptor->name = (char *)"Intel(R) Video Sprite";
adaptor->nEncodings = 1;
adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
adaptor->pEncodings[0].id = 0;
adaptor->pEncodings[0].pScreen = screen;
- adaptor->pEncodings[0].name = "XV_IMAGE";
+ adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
adaptor->pEncodings[0].width = IMAGE_MAX_WIDTH;
adaptor->pEncodings[0].height = IMAGE_MAX_HEIGHT;
adaptor->pEncodings[0].rate.numerator = 1;
@@ -493,9 +493,9 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen)
adaptor->nFormats = sna_xv_fixup_formats(screen, formats,
ARRAY_SIZE(formats));
adaptor->nAttributes = ARRAY_SIZE(attribs);
- adaptor->pAttributes = attribs;
+ adaptor->pAttributes = (XvAttributeRec *)attribs;
adaptor->nImages = ARRAY_SIZE(images);
- adaptor->pImages = images;
+ adaptor->pImages = (XvImageRec *)images;
adaptor->ddAllocatePort = sna_xv_alloc_port;
adaptor->ddFreePort = sna_xv_free_port;
adaptor->ddPutVideo = NULL;
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 1d199238..d3ce2804 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -43,9 +43,9 @@ static XvFormatRec Formats[] = {
};
static const XvAttributeRec Attributes[] = {
- {XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"},
- //{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
- //{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
+ {XvSettable | XvGettable, -1, 1, (char *)"XV_SYNC_TO_VBLANK"},
+ //{XvSettable | XvGettable, -128, 127, (char *)"XV_BRIGHTNESS"},
+ //{XvSettable | XvGettable, 0, 255, (char *)"XV_CONTRAST"},
};
static const XvImageRec Images[] = {
@@ -361,12 +361,12 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
adaptor->type = XvInputMask | XvImageMask;
adaptor->pScreen = screen;
- adaptor->name = "Intel(R) Textured Video";
+ adaptor->name = (char *)"Intel(R) Textured Video";
adaptor->nEncodings = 1;
adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
adaptor->pEncodings[0].id = 0;
adaptor->pEncodings[0].pScreen = screen;
- adaptor->pEncodings[0].name = "XV_IMAGE";
+ adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
adaptor->pEncodings[0].width = sna->render.max_3d_size;
adaptor->pEncodings[0].height = sna->render.max_3d_size;
adaptor->pEncodings[0].rate.numerator = 1;
@@ -375,9 +375,9 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
adaptor->nFormats = sna_xv_fixup_formats(screen, Formats,
ARRAY_SIZE(Formats));
adaptor->nAttributes = ARRAY_SIZE(Attributes);
- adaptor->pAttributes = Attributes;
+ adaptor->pAttributes = (XvAttributeRec *)Attributes;
adaptor->nImages = ARRAY_SIZE(Images);
- adaptor->pImages = Images;
+ adaptor->pImages = (XvImageRec *)Images;
adaptor->ddAllocatePort = sna_xv_alloc_port;
adaptor->ddFreePort = sna_xv_free_port;
adaptor->ddPutVideo = NULL;