Dmitry Volyntsev
January 09, 2020 07:56AM
details: https://hg.nginx.org/njs/rev/16e786db8720
branches:
changeset: 1297:16e786db8720
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu Jan 09 15:55:05 2020 +0300
description:
Removed dead store assignments.

Found by Clang static analyzer.

diffstat:

src/njs_chb.c | 1 -
src/njs_number.c | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r aa9a42bfc727 -r 16e786db8720 src/njs_chb.c
--- a/src/njs_chb.c Thu Jan 09 15:54:52 2020 +0300
+++ b/src/njs_chb.c Thu Jan 09 15:55:05 2020 +0300
@@ -203,7 +203,6 @@ njs_chb_join(njs_chb_t *chain, njs_str_t
return NJS_ERROR;
}

- n = chain->nodes;
str->length = size;
str->start = start;

diff -r aa9a42bfc727 -r 16e786db8720 src/njs_number.c
--- a/src/njs_number.c Thu Jan 09 15:54:52 2020 +0300
+++ b/src/njs_number.c Thu Jan 09 15:55:05 2020 +0300
@@ -695,7 +695,7 @@ njs_number_prototype_to_fixed(njs_vm_t *
if (frac > 0) {
*p++ = '.';

- p = njs_cpymem(p, &buf2[point], frac);
+ memcpy(p, &buf2[point], frac);
}

return NJS_OK;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Removed dead store assignments.

Dmitry Volyntsev 104 January 09, 2020 07:56AM



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

Online Users

Guests: 49
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready