From: Paul Eggert Date: Tue, 15 Mar 2011 18:32:28 +0000 (-0700) Subject: * regex.c: (regex_compile, re_search_2, re_match_2_internal): X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~66 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abbd1bcfeca309634cb602bc570f22e232846568;p=emacs.git * regex.c: (regex_compile, re_search_2, re_match_2_internal): Remove unused local vars. --- diff --git a/src/ChangeLog b/src/ChangeLog index 73669e11c98..2bcca8b0562 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. (regex_compile, re_match_2_internal): Move locals to avoid shadowing. + (regex_compile, re_search_2, re_match_2_internal): + Remove unused local vars. * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 6babbfbed76..e79316d6bc6 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2571,9 +2571,6 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* If the object matched can contain multibyte characters. */ const boolean multibyte = RE_MULTIBYTE_P (bufp); - /* If a target of matching can contain multibyte characters. */ - const boolean target_multibyte = RE_TARGET_MULTIBYTE_P (bufp); - /* Nonzero if we have pushed down into a subpattern. */ int in_subpattern = 0; @@ -2928,7 +2925,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct { boolean escaped_char = false; const unsigned char *p2 = p; - re_wchar_t ch, c2; + re_wchar_t ch; if (p == pend) FREE_STACK_RETURN (REG_EBRACK); @@ -2991,10 +2988,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct them). */ if (c == ':' && *p == ']') { - re_wctype_t cc; - int limit; - - cc = re_wctype (str); + re_wctype_t cc = re_wctype (str); if (cc == 0) FREE_STACK_RETURN (REG_ECTYPE); @@ -4558,7 +4552,6 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const if (multibyte) { re_char *p = POS_ADDR_VSTRING (startpos); - re_char *pend = STOP_ADDR_VSTRING (startpos); int len = BYTES_BY_CHAR_HEAD (*p); range -= len; @@ -5462,7 +5455,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int else do { - int pat_charlen, buf_charlen; + int pat_charlen; int pat_ch, buf_ch; PREFETCH ();