* regex.c: conform to C89 pointer rules
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Feb 2011 05:48:19 +0000 (21:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Feb 2011 05:48:19 +0000 (21:48 -0800)
src/ChangeLog
src/regex.c

index a5e0017..75113bb 100644 (file)
@@ -1,5 +1,10 @@
 2011-02-05  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * regex.c: conform to C89 pointer rules
+       (re_wctype): Add cast, as C89 does not allow assigning between
+       char * and unsigned char *.
+       (regex_compile): Likewise.
+
        sync from gnulib to remove HAVE_STDBOOL_H
        * config.in: Regenerate.
 
index cb6edc2..9284be9 100644 (file)
@@ -2118,7 +2118,7 @@ struct range_table_work_area
 re_wctype_t
 re_wctype (const re_char *str)
 {
-  const char *string = str;
+  const char *string = (const char *) str;
   if      (STREQ (string, "alnum"))    return RECC_ALNUM;
   else if (STREQ (string, "alpha"))    return RECC_ALPHA;
   else if (STREQ (string, "word"))     return RECC_WORD;
@@ -2700,7 +2700,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
            main_pend = pend;
            main_pattern = pattern;
            p = pattern = whitespace_regexp;
-           pend = p + strlen (p);
+           pend = p + strlen ((const char *) p);
            break;
          }