From 56c405d46a86853771a0b808da4c8a9ef626960c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 17 Aug 2013 13:07:23 +0200 Subject: [PATCH] kdrive: Fix a few easy cast warnings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau --- 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 9982fad36..63e840996 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 498c2398d..00de2ae0e 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 f4424478a..aaab0cdf3 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 d1522a2d0..e5417a567 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",