From 933b5d1f1fe9273d1a984707687b36ec61c4c5af Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 10 Nov 2011 21:32:15 -0800 Subject: Fix gcc -Wwrite-strings warnings that don't require public API changes Signed-off-by: Alan Coopersmith --- src/WrFFrI.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/WrFFrI.c') diff --git a/src/WrFFrI.c b/src/WrFFrI.c index 83c11fa..b592fa1 100644 --- a/src/WrFFrI.c +++ b/src/WrFFrI.c @@ -51,7 +51,7 @@ #endif /* MS Windows define a function called WriteFile @#%#&!!! */ -LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, char *name, +LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, const char *name, XpmInfo *info)); LFUNC(WriteColors, void, (FILE *file, XpmColor *colors, unsigned int ncolors)); @@ -104,7 +104,8 @@ XpmWriteFileFromXpmImage( XpmInfo *info) { xpmData mdata; - char *name, *dot, *s, new_name[BUFSIZ] = {0}; + const char *name; + char *dot, *s, new_name[BUFSIZ] = {0}; int ErrorStatus; /* open file to write */ @@ -143,7 +144,7 @@ XpmWriteFileFromXpmImage( name = new_name; } /* change '-' to '_' */ - s = name; + s = new_name; while ((dot = strchr(s, '-'))) { *dot = '_'; s = dot; @@ -165,7 +166,7 @@ static int xpmWriteFile( FILE *file, XpmImage *image, - char *name, + const char *name, XpmInfo *info) { /* calculation variables */ -- cgit v1.2.3