Welcome! Log In Create A New Profile

Advanced

[njs] Suppressed spurious compilation warning with gcc-7 and older.

Dmitry Volyntsev
May 24, 2021 08:36AM
details: https://hg.nginx.org/njs/rev/55d405b30979
branches:
changeset: 1640:55d405b30979
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Mon May 24 12:33:36 2021 +0000
description:
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;

diffstat:

src/njs_regexp.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r f1e8e753417d -r 55d405b30979 src/njs_regexp.c
--- a/src/njs_regexp.c Mon May 24 10:51:48 2021 +0000
+++ b/src/njs_regexp.c Mon May 24 12:33:36 2021 +0000
@@ -1301,6 +1301,7 @@ njs_regexp_prototype_symbol_replace(njs_
}

i = 0;
+ pos = 0;
next_pos = 0;

while (i < results.items) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Suppressed spurious compilation warning with gcc-7 and older.

Dmitry Volyntsev 256 May 24, 2021 08:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 206
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready