summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-26 15:57:02 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-26 15:57:02 -0700
commite7d3ef457bff9d14b308b88d88f7942eca1cabb8 (patch)
tree72e5667e9fc2087cd0986e2b270ef43a5c3c2e89
parent37e97808cae61b7488ba0b3dfb9e7f66cbee1874 (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--showrgb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/showrgb.c b/showrgb.c
index bf676cf..e2d5a0f 100644
--- a/showrgb.c
+++ b/showrgb.c
@@ -49,12 +49,12 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xfuncs.h>
static char *ProgramName;
-static void dumprgb(char *filename);
+static void dumprgb(const char *filename);
int
main (int argc, char *argv[])
{
- char *dbname = RGB_DB;
+ const char *dbname = RGB_DB;
ProgramName = argv[0];
if (argc == 2)
@@ -66,7 +66,7 @@ main (int argc, char *argv[])
#ifndef USE_RGB_TXT
static void
-dumprgb (char *filename)
+dumprgb (const char *filename)
{
#ifdef NDBM
DBM *rgb_dbm;
@@ -115,7 +115,7 @@ dumprgb (char *filename)
#else /* USE_RGB_TXT */
static void
-dumprgb (char *filename)
+dumprgb (const char *filename)
{
FILE *rgb;
char *path;