From 9284453e020c35e2682b63efb74e7ebffc7d2e9b Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 24 May 2021 12:33:36 +0000 Subject: [PATCH] Suppressed spurious compilation warning with gcc-7 and older. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit src/njs_regexp.c:1335:19: error: ‘pos’ may be used uninitialized in this function [-Werror=maybe-uninitialized] pos = njs_string_offset(s.start, s.start + s.size, pos) - s.start; --- src/njs_regexp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/njs_regexp.c b/src/njs_regexp.c index 00a73e77..c96a53ac 100644 --- a/src/njs_regexp.c +++ b/src/njs_regexp.c @@ -1301,6 +1301,7 @@ njs_regexp_prototype_symbol_replace(njs_vm_t *vm, njs_value_t *args, } i = 0; + pos = 0; next_pos = 0; while (i < results.items) { -- 2.47.3