diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 14:43:27 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 14:43:27 -0700 |
commit | 966e58a5522c56ad5144ad5fe51273f24e9e729e (patch) | |
tree | 0bee0982703b82e3beb8401d34b5dad222511d66 | |
parent | 2eb55c2ed3a0e01466cb64d2e74905461eac3c66 (diff) |
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | lndir.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -73,7 +73,7 @@ char *rcurdir; char *curdir; static void -quit (int code, char * fmt, ...) +quit (int code, const char * fmt, ...) { va_list args; va_start(args, fmt); @@ -84,14 +84,14 @@ quit (int code, char * fmt, ...) } static void -quiterr (int code, char *s) +quiterr (int code, const char *s) { perror (s); exit (code); } static void -msg (char * fmt, ...) +msg (const char * fmt, ...) { va_list args; if (curdir) { @@ -135,7 +135,7 @@ equivalent(char *lname, char *rname, char **p) /* Recursively create symbolic links from the current directory to the "from" directory. Assumes that files described by fs and ts are directories. */ static int -dodir (char *fn, /* name of "from" directory, either absolute or +dodir (const char *fn, /* name of "from" directory, either absolute or relative to cwd */ struct stat *fs, struct stat *ts, /* stats for the "from" directory and cwd */ @@ -329,7 +329,7 @@ int main (int argc, char *argv[]) { char *prog_name = argv[0]; - char *fn, *tn; + const char *fn, *tn; struct stat fs, ts; while (++argv, --argc) { |