diff options
author | Jerry D. Hedden" (via RT) <perlbug-followup@perl.org> | 2010-08-23 08:37:07 -0700 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-08-25 17:38:40 +0100 |
commit | a4ec4e6810ad6fb9adb69ff1e5a65fa765aa5f09 (patch) | |
tree | 1345f195d45fd61ecbe19f533b1148f0d4955449 /cygwin | |
parent | c920e01829265990eb68b8bd0d14811ffbb42650 (diff) | |
download | perl-a4ec4e6810ad6fb9adb69ff1e5a65fa765aa5f09.tar.gz |
Fix -Wwrite-string warnings in cygwin.c
[perl #77376]
Fix the following build warnings that are now being
generated because -Wwrite-string has been turned on:
cygwin.c: In function `do_aspawn':
cygwin.c:69: warning: assignment discards qualifiers from pointer target type
cygwin.c: In function `do_spawn':
cygwin.c:91: warning: initialization discards qualifiers from pointer
target type
cygwin.c: In function `init_os_extras':
cygwin.c:544: warning: initialization discards qualifiers from pointer
target type
Diffstat (limited to 'cygwin')
-rw-r--r-- | cygwin/cygwin.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c index 21ec98cd6e..aa6938d279 100644 --- a/cygwin/cygwin.c +++ b/cygwin/cygwin.c @@ -51,12 +51,14 @@ do_aspawn (SV *really, void **mark, void **sp) { dTHX; int rc; - char **a,*tmps,**argv; - STRLEN n_a; + char const **a; + char *tmps,**argv; + STRLEN n_a; if (sp<=mark) return -1; - a=argv=(char**) alloca ((sp-mark+3)*sizeof (char*)); + argv=(char**) alloca ((sp-mark+3)*sizeof (char*)); + a=(char const **)argv; while (++mark <= sp) if (*mark) @@ -84,7 +86,8 @@ do_spawn (char *cmd) { dTHX; char const **a; - char *s,*metachars = "$&*(){}[]'\";\\?>|<~`\n"; + char *s; + char const *metachars = "$&*(){}[]'\";\\?>|<~`\n"; const char *command[4]; while (*cmd && isSPACE(*cmd)) @@ -355,7 +358,7 @@ void init_os_extras(void) { dTHX; - char *file = __FILE__; + char const *file = __FILE__; void *handle; newXS("Cwd::cwd", Cygwin_cwd, file); |