[PATCH 7/9] kdrive: Fix const cast warnings in arguments processing.
Eric Anholt
eric at anholt.net
Sat Aug 17 15:36:41 PDT 2013
---
hw/kdrive/ephyr/ephyrinit.c | 4 ++--
hw/kdrive/ephyr/os.c | 2 +-
hw/kdrive/src/kdrive.c | 6 +++---
hw/kdrive/src/kdrive.h | 9 +++++----
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 adacac9..9a1dd7d 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 a2a705d..56b52d1 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 1899a27..f8949be 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 96787b6..d5d0799 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 3aad87a..f93830e 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;
--
1.8.4.rc2
More information about the xorg-devel
mailing list