[PATCH 6/9] kdrive: Fix const cast warnings in driver name handling.

Eric Anholt eric at anholt.net
Sat Aug 17 15:36:40 PDT 2013


---
 hw/kdrive/linux/mouse.c | 2 +-
 hw/kdrive/src/kdrive.h  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index aaab0cd..2bfe7f2 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -193,7 +193,7 @@ MouseWriteBytes(int fd, unsigned char *c, int n, int timeout)
 #define MAX_VALID   4           /* number of valid packets before accepting */
 
 typedef struct _kmouseProt {
-    char *name;
+    const char *name;
     Bool (*Complete) (KdPointerInfo * pi, unsigned char *ev, int ne);
     int (*Valid) (KdPointerInfo * pi, unsigned char *ev, int ne);
     Bool (*Parse) (KdPointerInfo * pi, unsigned char *ev, int ne);
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 4829e1a..96787b6 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -174,7 +174,7 @@ typedef enum _kdPointerState {
 typedef struct _KdPointerInfo KdPointerInfo;
 
 typedef struct _KdPointerDriver {
-    char *name;
+    const char *name;
      Status(*Init) (KdPointerInfo *);
      Status(*Enable) (KdPointerInfo *);
     void (*Disable) (KdPointerInfo *);
@@ -243,7 +243,7 @@ typedef struct {
 typedef struct _KdKeyboardInfo KdKeyboardInfo;
 
 typedef struct _KdKeyboardDriver {
-    char *name;
+    const char *name;
     Bool (*Init) (KdKeyboardInfo *);
     Bool (*Enable) (KdKeyboardInfo *);
     void (*Leds) (KdKeyboardInfo *, int);
-- 
1.8.4.rc2



More information about the xorg-devel mailing list