[njs] Fixed various dead store assignments.
Dmitry Volyntsev
xeioex at nginx.com
Thu Oct 5 12:51:03 UTC 2017
details: http://hg.nginx.org/njs/rev/b4462c7dc1b1
branches:
changeset: 414:b4462c7dc1b1
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Thu Oct 05 15:50:36 2017 +0300
description:
Fixed various dead store assignments.
diffstat:
njs/njs_json.c | 2 +-
njs/njs_parser_expression.c | 6 ------
2 files changed, 1 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r 6789d9142b05 -r b4462c7dc1b1 njs/njs_json.c
--- a/njs/njs_json.c Thu Oct 05 15:50:17 2017 +0300
+++ b/njs/njs_json.c Thu Oct 05 15:50:36 2017 +0300
@@ -1014,7 +1014,7 @@ njs_json_parse_continuation(njs_vm_t *vm
}
} else {
- state = njs_json_pop_parse_state(parse);
+ (void) njs_json_pop_parse_state(parse);
}
return njs_json_parse_continuation_apply(vm, parse);
diff -r 6789d9142b05 -r b4462c7dc1b1 njs/njs_parser_expression.c
--- a/njs/njs_parser_expression.c Thu Oct 05 15:50:17 2017 +0300
+++ b/njs/njs_parser_expression.c Thu Oct 05 15:50:36 2017 +0300
@@ -269,8 +269,6 @@ njs_parser_var_expression(njs_vm_t *vm,
}
for ( ;; ) {
- size = sizeof(njs_vmcode_3addr_t);
-
switch (token) {
case NJS_TOKEN_ASSIGNMENT:
@@ -295,8 +293,6 @@ njs_parser_var_expression(njs_vm_t *vm,
return token;
}
- node = parser->node;
-
if (!njs_parser_is_lvalue(parser->node)) {
nxt_alert(&vm->trace, NXT_LEVEL_ERROR,
"ReferenceError: Invalid left-hand side in assignment");
@@ -435,8 +431,6 @@ njs_parser_assignment_expression(njs_vm_
return token;
}
- node = parser->node;
-
if (!njs_parser_is_lvalue(parser->node)) {
nxt_alert(&vm->trace, NXT_LEVEL_ERROR,
"ReferenceError: Invalid left-hand side in assignment");
More information about the nginx-devel
mailing list