From bf05793b4d0b88b38e2379fc326d791af6c2cab0 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 27 Jul 2013 07:10:08 -0700 Subject: [PATCH] regexec.c:regexec_flags: Remove unused var This variable, end_shift, only ever holds the value 0. It is used in only one place, where its value is assigned to another variable. The history is interesting: start_shift and end_shift were added in c277df42229, which added sub- string optimisations. 146174a91a192 rearranged stuff a bit, causing these variables to be unused. 155aba94f6 commented out the unused start_shift to suppress a compiler warning. 1df70142a966e remove= the start_shift comment, leaving the comment describing end_shift nonsensical. --- regexec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/regexec.c b/regexec.c index 44690b3..a1d61a5 100644 --- a/regexec.c +++ b/regexec.c @@ -2221,7 +2221,6 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend, char *startpos; I32 minlen; /* must match at least this many chars */ I32 dontbother = 0; /* how many characters not to try at end */ - I32 end_shift = 0; /* Same for the end. */ /* CC */ const bool utf8_target = cBOOL(DO_UTF8(sv)); I32 multiline; RXi_GET_DECL(prog,progi); @@ -2660,7 +2659,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend, /* XXXX check_substr already used to find "s", can optimize if check_substr==must. */ - dontbother = end_shift; + dontbother = 0; strend = HOPc(strend, -dontbother); while ( (s <= last) && (s = fbm_instr((unsigned char*)HOP3(s, back_min, (back_min<0 ? strbeg : strend)), -- 2.7.4