From 3715cd752bac912a56aa1cbb9dd874624a709aab Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 2 Oct 2011 09:16:05 -0700 Subject: Add const attributes to fix gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston --- src/util/atom.c | 4 ++-- src/util/fontxlfd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/atom.c b/src/util/atom.c index 4f69363..c47cb5c 100644 --- a/src/util/atom.c +++ b/src/util/atom.c @@ -54,7 +54,7 @@ static int reverseMapSize; static Atom lastAtom; static int -Hash(char *string, int len) +Hash(const char *string, int len) { int h; @@ -147,7 +147,7 @@ NameEqual (const char *a, const char *b, int l) #endif weak Atom -MakeAtom(char *string, unsigned len, int makeit) +MakeAtom(const char *string, unsigned len, int makeit) { AtomListPtr a; int hash; diff --git a/src/util/fontxlfd.c b/src/util/fontxlfd.c index 8124037..18046e9 100644 --- a/src/util/fontxlfd.c +++ b/src/util/fontxlfd.c @@ -70,7 +70,7 @@ GetInt(char *ptr, int *val) #ifndef NO_LOCALE static struct lconv *locale = 0; #endif -static char *radix = ".", *plus = "+", *minus = "-"; +static const char *radix = ".", *plus = "+", *minus = "-"; static char * readreal(char *ptr, double *result) -- cgit v1.2.3