android:regex: fix compiler warning
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 8 Jun 2012 18:58:42 +0000 (20:58 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 9 Jun 2012 09:37:10 +0000 (11:37 +0200)
../../android/regex/regcomp.c: In function 'regcomp':
../../android/regex/regcomp.c:171: warning: cast discards qualifiers from pointer target type

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
android/regex/regcomp.c

index 19f4790..80649f6 100644 (file)
@@ -168,7 +168,7 @@ regcomp(regex_t *preg, const char *pattern, int cflags)
                        return(REG_INVARG);
                len = preg->re_endp - pattern;
        } else
-               len = strlen((char *)pattern);
+               len = strlen(pattern);
 
        /* do the mallocs early so failure handling is easy */
        g = (struct re_guts *)malloc(sizeof(struct re_guts) +