[PATCH 1/2] xv: Fix warnings in drivers using string literals in XV structs.

Eric Anholt eric at anholt.net
Sat Nov 17 13:08:11 PST 2012


The server doesn't need to mutate these strings, nor do we expect
drivers to.
---
 hw/xfree86/common/xf86xv.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h
index 091efca..f393369 100644
--- a/hw/xfree86/common/xf86xv.h
+++ b/hw/xfree86/common/xf86xv.h
@@ -137,7 +137,7 @@ typedef enum {
 
 typedef struct {
     int id;
-    char *name;
+    const char *name;
     unsigned short width, height;
     XvRationalRec rate;
 } XF86VideoEncodingRec, *XF86VideoEncodingPtr;
@@ -151,13 +151,13 @@ typedef struct {
     int flags;
     int min_value;
     int max_value;
-    char *name;
+    const char *name;
 } XF86AttributeRec, *XF86AttributePtr;
 
 typedef struct {
     unsigned int type;
     int flags;
-    char *name;
+    const char *name;
     int nEncodings;
     XF86VideoEncodingPtr pEncodings;
     int nFormats;
-- 
1.7.10.4



More information about the xorg-devel mailing list