[njs] Silenced cast to smaller integer type warning.

Alexander Borisov alexander.borisov at nginx.com
Mon Jun 1 15:11:08 UTC 2020


details:   https://hg.nginx.org/njs/rev/ff39edb94acf
branches:  
changeset: 1412:ff39edb94acf
user:      Alexander Borisov <alexander.borisov at nginx.com>
date:      Mon Jun 01 18:09:29 2020 +0300
description:
Silenced cast to smaller integer type warning.

This fixes compilation with clang 11.

diffstat:

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

diffs (21 lines):

diff -r b4a6f26b7e32 -r ff39edb94acf src/njs_parser.c
--- a/src/njs_parser.c	Mon Jun 01 18:09:29 2020 +0300
+++ b/src/njs_parser.c	Mon Jun 01 18:09:29 2020 +0300
@@ -6804,7 +6804,7 @@ njs_parser_get_set(njs_parser_t *parser,
     njs_parser_node_t  *property, *expression, *temp;
 
     temp = parser->target;
-    accessor = (njs_token_type_t) temp->right;
+    accessor = (njs_token_type_t) (uintptr_t) temp->right;
 
     name = token;
 
@@ -6906,7 +6906,7 @@ njs_parser_get_set_after(njs_parser_t *p
 
     temp = parser->target;
 
-    accessor = (njs_token_type_t) temp->right;
+    accessor = (njs_token_type_t) (uintptr_t) temp->right;
     temp->right = parser->node;
 
     parser->node = expression;


More information about the nginx-devel mailing list