]> git.eshelyaron.com Git - emacs.git/commitdiff
* regex.c: (regex_compile, re_search_2, re_match_2_internal):
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 18:32:28 +0000 (11:32 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 18:32:28 +0000 (11:32 -0700)
Remove unused local vars.

src/ChangeLog
src/regex.c

index 73669e11c984a1b1600e610a4aa7ffb3fb94187f..2bcca8b0562bc046945cdf47d73f659cbf45f5a2 100644 (file)
@@ -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.
index 6babbfbed761dfc46ec4e0246d66ddde36c106d1..e79316d6bc6f75e946913d7bd4bce3ffdb552dc2 100644 (file)
@@ -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 ();