summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 20:40:40 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 20:40:40 -0700
commit471a4ef735fae193305b29484975e0201fc00a4f (patch)
tree2ba8f10b1197c50e3bb32d401f9e4d6222ff9ffc
parentdc2354cdd2e7ad247dd2a3e456c90a40095b98ee (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xcursorgen.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/xcursorgen.c b/xcursorgen.c
index 2fc7a9f..195d6f6 100644
--- a/xcursorgen.c
+++ b/xcursorgen.c
@@ -45,7 +45,7 @@ struct flist
};
static void
-usage (char *name)
+usage (const char *name)
{
fprintf (stderr, "usage: %s [-V] [--version] [-?] [--help] [-p <dir>] [--prefix <dir>] [CONFIG [OUT]]\n",
name);
@@ -62,7 +62,7 @@ usage (char *name)
}
static int
-read_config_file (char *config, struct flist **list)
+read_config_file (const char *config, struct flist **list)
{
FILE *fp;
char line[4096], pngfile[4000];
@@ -172,7 +172,7 @@ premultiply_data (png_structp png, png_row_infop row_info, png_bytep data)
}
static XcursorImage *
-load_image (struct flist *list, char *prefix)
+load_image (struct flist *list, const char *prefix)
{
XcursorImage *image;
png_structp png;
@@ -290,7 +290,8 @@ load_image (struct flist *list, char *prefix)
}
static int
-write_cursors (int count, struct flist *list, char *filename, char *prefix)
+write_cursors (int count, struct flist *list,
+ const char *filename, const char *prefix)
{
XcursorImages *cimages;
XcursorImage *image;
@@ -371,8 +372,8 @@ main (int argc, char *argv[])
{
struct flist *list;
int count;
- char *in = NULL, *out = NULL;
- char *prefix = NULL;
+ const char *in = NULL, *out = NULL;
+ const char *prefix = NULL;
int i;
for (i = 1; i < argc; i++)