diff --git a/regcomp.c b/regcomp.c index ad4b5507a0bd..abf8cb6499be 100644 --- a/regcomp.c +++ b/regcomp.c @@ -1571,8 +1571,7 @@ S_ssc_is_anything(const regnode_ssc *ssc) /* If e.g., both \w and \W are set, matches everything */ if (ANYOF_POSIXL_SSC_TEST_ANY_SET(ssc)) { - int i; - for (i = 0; i < ANYOF_POSIXL_MAX; i += 2) { + for (int i = 0; i < ANYOF_POSIXL_MAX; i += 2) { if (ANYOF_POSIXL_TEST(ssc, i) && ANYOF_POSIXL_TEST(ssc, i+1)) { return TRUE; } @@ -1659,7 +1658,6 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, SV* invlist = NULL; SV* only_utf8_locale_invlist = NULL; - unsigned int i; const U32 n = ARG(node); bool new_node_has_latin1 = FALSE; const U8 flags = (inRANGE(OP(node), ANYOFH, ANYOFRb)) @@ -1718,7 +1716,7 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, /* Add in the points from the bit map */ if (! inRANGE(OP(node), ANYOFH, ANYOFRb)) { - for (i = 0; i < NUM_ANYOF_CODE_POINTS; i++) { + for (unsigned int i = 0; i < NUM_ANYOF_CODE_POINTS; i++) { if (ANYOF_BITMAP_TEST(node, i)) { unsigned int start = i++; @@ -1988,7 +1986,6 @@ S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, * another SSC or a regular ANYOF class. Can create false positives if * 'or_with' is to be inverted. */ - SV* ored_cp_list; U8 ored_flags; U8 or_with_flags = inRANGE(OP(or_with), ANYOFH, ANYOFRb) ? 0 @@ -2000,6 +1997,7 @@ S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, /* 'or_with' is used as-is if it too is an SSC; otherwise have to extract * the code point inversion list and just the relevant flags */ + SV* ored_cp_list; if (is_ANYOF_SYNTHETIC(or_with)) { ored_cp_list = ((regnode_ssc*) or_with)->invlist; ored_flags = or_with_flags;