Skip to content

Commit 2a4c81f

Browse files
committed
Fix [-Wjump-misses-init] in php_mbregex.c by adding an inner scope
1 parent 08c5c69 commit 2a4c81f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/mbstring/php_mbregex.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ static inline void mb_regex_substitute(
768768
p++;
769769
break;
770770
case 'k':
771+
{
771772
clen = (int) php_mb_mbchar_bytes_ex(++p, enc);
772773
if (clen != 1 || p == eos || (p[0] != '<' && p[0] != '\'')) {
773774
/* not a backref delimiter */
@@ -817,6 +818,7 @@ static inline void mb_regex_substitute(
817818
}
818819
no = onig_name_to_backref_number(regexp, (OnigUChar *)name, (OnigUChar *)name_end, regs);
819820
break;
821+
}
820822
default:
821823
/* We're not treating \ as an escape character and will interpret something like
822824
* \\1 as \ followed by \1, rather than \\ followed by 1. This is because this

0 commit comments

Comments
 (0)