From: Dmitry Volyntsev Date: Mon, 24 May 2021 12:33:36 +0000 (+0000) Subject: Suppressed spurious compilation warning with gcc-7 and older. X-Git-Tag: 0.6.0~21 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=9284453e020c35e2682b63efb74e7ebffc7d2e9b;p=njs.git Suppressed spurious compilation warning with gcc-7 and older. 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; --- 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) {