From 50ace4fec5e8cb5afcbc656a4556fa528adfd760 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 16 Jun 2010 16:36:41 -0700 Subject: Remove compiler warnings when building Bionic. Also add missing declarations to misc. functions. Fix clearerr() implementation (previous was broken). Handle feature test macros like _POSIX_C_SOURCE properly. Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4 --- libc/regex/engine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/regex/engine.c') diff --git a/libc/regex/engine.c b/libc/regex/engine.c index 66be3c7..eae6ff2 100644 --- a/libc/regex/engine.c +++ b/libc/regex/engine.c @@ -209,7 +209,7 @@ matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], STATETEARDOWN(m); return(REG_ESPACE); } - for (i = 1; i <= m->g->nsub; i++) + for (i = 1; i <= (int)m->g->nsub; i++) m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; if (!g->backrefs && !(m->eflags®_BACKR)) { NOTE("dissecting"); @@ -267,8 +267,8 @@ matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], } if (nmatch > 1) { assert(m->pmatch != NULL); - for (i = 1; i < nmatch; i++) - if (i <= m->g->nsub) + for (i = 1; i < (ssize_t)nmatch; i++) + if (i <= (int)m->g->nsub) pmatch[i] = m->pmatch[i]; else { pmatch[i].rm_so = -1; -- cgit v1.1