diff options
author | Eric Anholt <eric@anholt.net> | 2013-08-17 14:36:09 +0200 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-08-21 09:10:46 -0700 |
commit | 77c7a2014e3942b55c0b78308edf02eab33f2e60 (patch) | |
tree | eb6ecf0e4a7cad80273159b0d5846bdb2c4913d0 | |
parent | 7107937e473a3557c37d719cb100b2e9b09075dd (diff) |
kdrive: Fix const cast warnings in arguments processing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | hw/kdrive/ephyr/ephyrinit.c | 4 | ||||
-rw-r--r-- | hw/kdrive/ephyr/os.c | 2 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.c | 6 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.h | 9 | ||||
-rw-r--r-- | hw/kdrive/src/kinput.c | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index adacac949..9a1dd7d94 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -45,7 +45,7 @@ extern KdPointerDriver LinuxEvdevMouseDriver; extern KdKeyboardDriver LinuxEvdevKeyboardDriver; #endif -void processScreenArg(char *screen_size, char *parent_id); +void processScreenArg(const char *screen_size, char *parent_id); void InitCard(char *name) @@ -134,7 +134,7 @@ ddxUseMsg(void) } void -processScreenArg(char *screen_size, char *parent_id) +processScreenArg(const char *screen_size, char *parent_id) { KdCardInfo *card; diff --git a/hw/kdrive/ephyr/os.c b/hw/kdrive/ephyr/os.c index a2a705dd9..56b52d143 100644 --- a/hw/kdrive/ephyr/os.c +++ b/hw/kdrive/ephyr/os.c @@ -28,7 +28,7 @@ #endif #include "ephyr.h" -extern void processScreenArg(char *screen_size, char *parent_id); +extern void processScreenArg(const char *screen_size, char *parent_id); static int EphyrInit(void) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 1899a27a9..f8949bec3 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -246,8 +246,8 @@ ddxGiveUp(enum ExitCode error) Bool kdDumbDriver; Bool kdSoftCursor; -char * -KdParseFindNext(char *cur, const char *delim, char *save, char *last) +const char * +KdParseFindNext(const char *cur, const char *delim, char *save, char *last) { while (*cur && !strchr(delim, *cur)) { *save++ = *cur++; @@ -282,7 +282,7 @@ KdSubRotation(Rotation a, Rotation b) } void -KdParseScreen(KdScreenInfo * screen, char *arg) +KdParseScreen(KdScreenInfo * screen, const char *arg) { char delim; char save[1024]; diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 96787b6a8..d5d0799df 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -411,13 +411,14 @@ Rotation KdAddRotation(Rotation a, Rotation b); Rotation KdSubRotation(Rotation a, Rotation b); void - KdParseScreen(KdScreenInfo * screen, char *arg); + KdParseScreen(KdScreenInfo * screen, const char *arg); -KdPointerInfo *KdParsePointer(char *arg); +KdPointerInfo *KdParsePointer(const char *arg); -KdKeyboardInfo *KdParseKeyboard(char *arg); +KdKeyboardInfo *KdParseKeyboard(const char *arg); -char *KdParseFindNext(char *cur, const char *delim, char *save, char *last); +const char * +KdParseFindNext(const char *cur, const char *delim, char *save, char *last); void KdParseRgba(char *rgba); diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 3aad87a88..f93830eb1 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1086,7 +1086,7 @@ KdParseKbdOptions(KdKeyboardInfo * ki) } KdKeyboardInfo * -KdParseKeyboard(char *arg) +KdParseKeyboard(const char *arg) { char save[1024]; char delim; @@ -1178,7 +1178,7 @@ KdParsePointerOptions(KdPointerInfo * pi) } KdPointerInfo * -KdParsePointer(char *arg) +KdParsePointer(const char *arg) { char save[1024]; char delim; |