The perl source has for some while been clean to -Wwrite-strings.
I suggest this warning be added to cflags.
The patch makes the appropriate change to cflags.SH and silences a warning from mg.c
'') ;;
[12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
Intel*) ;; # # Is that you, Intel C++?
-*) for opt in -ansi -std=c89 -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
+*) for opt in -ansi -std=c89 -W -Wextra -Wdeclaration-after-statement \
+ -Wendif-labels -Wc++-compat -Wwrite-strings
do
case " $ccflags " in
*" $opt "*) ;; # Skip if already there.
{
dVAR;
register I32 paren;
- register char *s = NULL;
+ register const char *s = NULL;
register REGEXP *rx;
const char * const remaining = mg->mg_ptr + 1;
const char nextchar = *remaining;