* regcomp.c (p_ere): Workaround incorrect compiler warning.

* regerror.c (regatoi): Return non-const string or compiler complains in
certain inexplicable situations.
This commit is contained in:
Christopher Faylor 2010-02-04 21:05:07 +00:00
parent fa40bd922e
commit 6e3f2c626d
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2010-02-04 Christopher Faylor <me+cygwin@cgf.cx>
* regcomp.c (p_ere): Workaround incorrect compiler warning.
* regerror.c (regatoi): Return non-const string or compiler complains
in certain inexplicable situations.
2010-02-04 Corinna Vinschen <corinna@vinschen.de> 2010-02-04 Corinna Vinschen <corinna@vinschen.de>
* regex/engine.c (step): Declare and define with `int ch' rather than * regex/engine.c (step): Declare and define with `int ch' rather than

View File

@ -315,8 +315,8 @@ p_ere(struct parse *p,
int stop) /* character this ERE should end at */ int stop) /* character this ERE should end at */
{ {
char c; char c;
sopno prevback; sopno prevback = 0;
sopno prevfwd; sopno prevfwd = 0;
sopno conc; sopno conc;
int first = 1; /* is this the first alternative? */ int first = 1; /* is this the first alternative? */

View File

@ -178,7 +178,7 @@ regatoi(const regex_t *preg, char *localbuf)
if (r->code == 0) if (r->code == 0)
#ifdef __CYGWIN__ /* Avoid whining compiler */ #ifdef __CYGWIN__ /* Avoid whining compiler */
{ {
static const char null[] = "0"; static char null[] = "0";
return null; return null;
} }
#else #else