[PATCH 18/25] KdParseFindNext: Constify delim argument
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Dec 11 10:16:31 PST 2011
It's only used as input to strchr to find the delimiters, never
written to.
Clears a bunch of gcc warnings of the form:
kdrive.c:323:2: warning: passing argument 2 of 'KdParseFindNext' discards qualifiers from pointer target type
kdrive.c:261:1: note: expected 'char *' but argument is of type 'const char *'
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
hw/kdrive/src/kdrive.c | 2 +-
hw/kdrive/src/kdrive.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 2c64940..f6cc351 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -253,7 +253,7 @@ Bool kdDumbDriver;
Bool kdSoftCursor;
char *
-KdParseFindNext (char *cur, char *delim, char *save, char *last)
+KdParseFindNext (char *cur, const char *delim, char *save, char *last)
{
while (*cur && !strchr (delim, *cur))
{
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 9ac5a19..be884ab 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -424,7 +424,7 @@ KdKeyboardInfo *
KdParseKeyboard (char *arg);
char *
-KdParseFindNext (char *cur, char *delim, char *save, char *last);
+KdParseFindNext (char *cur, const char *delim, char *save, char *last);
void
KdParseRgba (char *rgba);
--
1.7.3.2
More information about the xorg-devel
mailing list