[PATCH 6/8] kdrive: Mark XV names const to avoid warnings.

Eric Anholt eric at anholt.net
Mon May 5 13:09:11 PDT 2014


No code modifies it at runtime, and it's common to store string
literals to it.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 hw/kdrive/src/kxv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/src/kxv.h b/hw/kdrive/src/kxv.h
index e50615b..3a49a65 100644
--- a/hw/kdrive/src/kxv.h
+++ b/hw/kdrive/src/kxv.h
@@ -119,7 +119,7 @@ typedef enum {
 
 typedef struct {
     int id;
-    char *name;
+    const char *name;
     unsigned short width, height;
     XvRationalRec rate;
 } KdVideoEncodingRec, *KdVideoEncodingPtr;
@@ -132,7 +132,7 @@ typedef struct {
 typedef struct {
     unsigned int type;
     int flags;
-    char *name;
+    const char *name;
     int nEncodings;
     KdVideoEncodingPtr pEncodings;
     int nFormats;
-- 
1.9.2



More information about the xorg-devel mailing list