aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/regex.c13
2 files changed, 5 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 73669e11c98..2bcca8b0562 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,6 +3,8 @@
3 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): 3 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
4 Rename locals to avoid shadowing. 4 Rename locals to avoid shadowing.
5 (regex_compile, re_match_2_internal): Move locals to avoid shadowing. 5 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
6 (regex_compile, re_search_2, re_match_2_internal):
7 Remove unused local vars.
6 8
7 * search.c (boyer_moore): Rename locals to avoid shadowing. 9 * search.c (boyer_moore): Rename locals to avoid shadowing.
8 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. 10 * 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
2571 /* If the object matched can contain multibyte characters. */ 2571 /* If the object matched can contain multibyte characters. */
2572 const boolean multibyte = RE_MULTIBYTE_P (bufp); 2572 const boolean multibyte = RE_MULTIBYTE_P (bufp);
2573 2573
2574 /* If a target of matching can contain multibyte characters. */
2575 const boolean target_multibyte = RE_TARGET_MULTIBYTE_P (bufp);
2576
2577 /* Nonzero if we have pushed down into a subpattern. */ 2574 /* Nonzero if we have pushed down into a subpattern. */
2578 int in_subpattern = 0; 2575 int in_subpattern = 0;
2579 2576
@@ -2928,7 +2925,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
2928 { 2925 {
2929 boolean escaped_char = false; 2926 boolean escaped_char = false;
2930 const unsigned char *p2 = p; 2927 const unsigned char *p2 = p;
2931 re_wchar_t ch, c2; 2928 re_wchar_t ch;
2932 2929
2933 if (p == pend) FREE_STACK_RETURN (REG_EBRACK); 2930 if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
2934 2931
@@ -2991,10 +2988,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
2991 them). */ 2988 them). */
2992 if (c == ':' && *p == ']') 2989 if (c == ':' && *p == ']')
2993 { 2990 {
2994 re_wctype_t cc; 2991 re_wctype_t cc = re_wctype (str);
2995 int limit;
2996
2997 cc = re_wctype (str);
2998 2992
2999 if (cc == 0) 2993 if (cc == 0)
3000 FREE_STACK_RETURN (REG_ECTYPE); 2994 FREE_STACK_RETURN (REG_ECTYPE);
@@ -4558,7 +4552,6 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const
4558 if (multibyte) 4552 if (multibyte)
4559 { 4553 {
4560 re_char *p = POS_ADDR_VSTRING (startpos); 4554 re_char *p = POS_ADDR_VSTRING (startpos);
4561 re_char *pend = STOP_ADDR_VSTRING (startpos);
4562 int len = BYTES_BY_CHAR_HEAD (*p); 4555 int len = BYTES_BY_CHAR_HEAD (*p);
4563 4556
4564 range -= len; 4557 range -= len;
@@ -5462,7 +5455,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int
5462 else 5455 else
5463 do 5456 do
5464 { 5457 {
5465 int pat_charlen, buf_charlen; 5458 int pat_charlen;
5466 int pat_ch, buf_ch; 5459 int pat_ch, buf_ch;
5467 5460
5468 PREFETCH (); 5461 PREFETCH ();