[PATCH 5/9] kdrive: Fix a few easy cast warnings.

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


---
 hw/kdrive/linux/evdev.c | 2 +-
 hw/kdrive/linux/linux.c | 2 +-
 hw/kdrive/linux/mouse.c | 4 ++--
 hw/kdrive/linux/ps2.c   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c
index 9982fad..63e8409 100644
--- a/hw/kdrive/linux/evdev.c
+++ b/hw/kdrive/linux/evdev.c
@@ -186,7 +186,7 @@ EvdevPtrRead(int evdevPort, void *closure)
     }
 }
 
-char *kdefaultEvdev[] = {
+const char *kdefaultEvdev[] = {
     "/dev/input/event0",
     "/dev/input/event1",
     "/dev/input/event2",
diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 498c239..00de2ae 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -63,7 +63,7 @@ LinuxVTRequest(int sig)
 
 /* Check before chowning -- this avoids touching the file system */
 static void
-LinuxCheckChown(char *file)
+LinuxCheckChown(const char *file)
 {
     struct stat st;
     __uid_t u;
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index f442447..aaab0cd 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -738,7 +738,7 @@ MouseInitProtocol(Kmouse * km)
 }
 
 static void
-MouseFirstProtocol(Kmouse * km, char *prot)
+MouseFirstProtocol(Kmouse * km, const char *prot)
 {
     if (prot) {
         for (km->i_prot = 0; km->i_prot < NUM_PROT; km->i_prot++)
@@ -887,7 +887,7 @@ MouseRead(int mousePort, void *closure)
 
 int MouseInputType;
 
-char *kdefaultMouse[] = {
+const char *kdefaultMouse[] = {
     "/dev/input/mice",
     "/dev/mouse",
     "/dev/psaux",
diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
index d1522a2..e5417a5 100644
--- a/hw/kdrive/linux/ps2.c
+++ b/hw/kdrive/linux/ps2.c
@@ -58,7 +58,7 @@ Ps2ReadBytes(int fd, char *buf, int len, int min)
     return tot;
 }
 
-char *Ps2Names[] = {
+const char *Ps2Names[] = {
     "/dev/psaux",
 /*    "/dev/mouse", */
     "/dev/input/mice",
-- 
1.8.4.rc2



More information about the xorg-devel mailing list