summaryrefslogtreecommitdiff
path: root/src/WrFFrI.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-10 21:32:15 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-10 21:32:15 -0800
commit933b5d1f1fe9273d1a984707687b36ec61c4c5af (patch)
tree55380b7ce47074746febfd95e16ebb93381c2b7e /src/WrFFrI.c
parent696be14bcb4daef5280b425e297223c6ae530cb5 (diff)
Fix gcc -Wwrite-strings warnings that don't require public API changes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/WrFFrI.c')
-rw-r--r--src/WrFFrI.c9
1 files changed, 5 insertions, 4 deletions
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 */