X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fregex.c;h=420c7f4a47da26537ce0439a4716859c969fbd01;hb=29b2c556d2655b11483d07468d1eaf2dff1395ce;hp=951f2d10f33a8c969984bbe35e0d0d57e0979ece;hpb=4fe190829b7039ff7825bc3a8c7213e3bc90b1a4;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/regex.c b/libiberty/regex.c index 951f2d10f3..420c7f4a47 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -4,7 +4,7 @@ internationalization features.) Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2005 Free Software Foundation, Inc. + 2002, 2005, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -5910,11 +5910,14 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp, { /* 1 if this match ends in the same string (string1 or string2) as the best previous match. */ - boolean same_str_p = (FIRST_STRING_P (match_end) - == MATCHING_IN_FIRST_STRING); + boolean same_str_p; + /* 1 if this match is the best seen so far. */ boolean best_match_p; + same_str_p = (FIRST_STRING_P (match_end) + == MATCHING_IN_FIRST_STRING); + /* AIX compiler got confused when this was combined with the previous declaration. */ if (same_str_p) @@ -7137,8 +7140,8 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp, register from the stack, since lowest will == highest in `pop_failure_point'. */ active_reg_t dummy_low_reg, dummy_high_reg; - UCHAR_T *pdummy = NULL; - const CHAR_T *sdummy = NULL; + UCHAR_T *pdummy ATTRIBUTE_UNUSED = NULL; + const CHAR_T *sdummy ATTRIBUTE_UNUSED = NULL; DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); POP_FAILURE_POINT (sdummy, pdummy, @@ -7923,7 +7926,7 @@ regcomp (regex_t *preg, const char *pattern, int cflags) if (cflags & REG_ICASE) { - unsigned i; + int i; preg->translate = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE @@ -7933,7 +7936,7 @@ regcomp (regex_t *preg, const char *pattern, int cflags) /* Map uppercase characters to corresponding lowercase ones. */ for (i = 0; i < CHAR_SET_SIZE; i++) - preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : (int) i; + preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i; } else preg->translate = NULL;