summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-04-15 01:22:10 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-04-18 14:52:48 +0200
commit2a4c81f1ee12fc0fdb31a194d37d382d096bee26 (patch)
tree0ee53e994685362c09cbfc1a2b2d8a58d83916a5 /ext/mbstring/php_mbregex.c
parent08c5c69eff6f0110b373c55ee2246591d14cc82b (diff)
downloadphp-git-2a4c81f1ee12fc0fdb31a194d37d382d096bee26.tar.gz
Fix [-Wjump-misses-init] in php_mbregex.c by adding an inner scope
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index cbbe3532f0..43855545d7 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -768,6 +768,7 @@ static inline void mb_regex_substitute(
p++;
break;
case 'k':
+ {
clen = (int) php_mb_mbchar_bytes_ex(++p, enc);
if (clen != 1 || p == eos || (p[0] != '<' && p[0] != '\'')) {
/* not a backref delimiter */
@@ -817,6 +818,7 @@ static inline void mb_regex_substitute(
}
no = onig_name_to_backref_number(regexp, (OnigUChar *)name, (OnigUChar *)name_end, regs);
break;
+ }
default:
/* We're not treating \ as an escape character and will interpret something like
* \\1 as \ followed by \1, rather than \\ followed by 1. This is because this