[PATCH:libXft] Add const attributes to fix gcc -Wwrite-strings warnings

Alan Coopersmith alan.coopersmith at oracle.com
Mon Sep 26 15:43:04 PDT 2011


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/xftdpy.c      |    6 +++---
 src/xftfreetype.c |    2 +-
 src/xftinit.c     |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/xftdpy.c b/src/xftdpy.c
index 747b8db..86cd14c 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -307,7 +307,7 @@ XftDefaultParseBool (char *v)
 }
 
 static Bool
-_XftDefaultInitBool (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitBool (Display *dpy, FcPattern *pat, const char *option)
 {
     char    *v;
     int	    i;
@@ -319,7 +319,7 @@ _XftDefaultInitBool (Display *dpy, FcPattern *pat, char *option)
 }
 
 static Bool
-_XftDefaultInitDouble (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitDouble (Display *dpy, FcPattern *pat, const char *option)
 {
     char    *v, *e;
     double  d;
@@ -335,7 +335,7 @@ _XftDefaultInitDouble (Display *dpy, FcPattern *pat, char *option)
 }
 
 static Bool
-_XftDefaultInitInteger (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitInteger (Display *dpy, FcPattern *pat, const char *option)
 {
     char    *v, *e;
     int	    i;
diff --git a/src/xftfreetype.c b/src/xftfreetype.c
index 3d930be..3f8dfef 100644
--- a/src/xftfreetype.c
+++ b/src/xftfreetype.c
@@ -164,7 +164,7 @@ _XftLockFile (XftFtFile *f)
 }
 
 static void
-_XftLockError (char *reason)
+_XftLockError (const char *reason)
 {
     fprintf (stderr, "Xft: locking error %s\n", reason);
 }
diff --git a/src/xftinit.c b/src/xftinit.c
index 0205e4b..ff23722 100644
--- a/src/xftinit.c
+++ b/src/xftinit.c
@@ -43,7 +43,7 @@ XftGetVersion (void)
 }
 
 static struct {
-    char    *name;
+    const char *name;
     int	    alloc_count;
     int	    alloc_mem;
     int	    free_count;
-- 
1.7.3.2



More information about the xorg-devel mailing list