diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2022-11-20 04:13:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 12:13:16 +0000 |
commit | 8162bc753a8f5a195ddda0de7b4293fc1b1f13d5 (patch) | |
tree | 344fe9b27baf781f3108782a5884f6636a3da0de | |
parent | 4686eb098af4507e04fa9e06d485d7ccbc23fdeb (diff) | |
download | pcre-8162bc753a8f5a195ddda0de7b4293fc1b1f13d5.tar.gz |
Silence warnings about uninitialized min/max_repeat variables. (#159)
pcre2_compile.c:3306:27: warning: variable 'min_repeat' may be uninitialized
when used here [-Wconditional-uninitialized]
pcre2_compile.c:2690:22: note: initialize the variable 'min_repeat' to
silence this warning
pcre2_compile.c:3307:27: warning: variable 'max_repeat' may be uninitialized
when used here [-Wconditional-uninitialized]
pcre2_compile.c:2690:34: note: initialize the variable 'max_repeat' to silence
this warning
-rw-r--r-- | src/pcre2_compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index cf94ff77..1b40ed56 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -2689,7 +2689,7 @@ if ((options & PCRE2_EXTENDED_MORE) != 0) options |= PCRE2_EXTENDED; while (ptr < ptrend) { int prev_expect_cond_assert; - uint32_t min_repeat, max_repeat; + uint32_t min_repeat = 0, max_repeat = 0; uint32_t set, unset, *optset; uint32_t terminator; uint32_t prev_meta_quantifier; |