[njs] Silenced Coverity false-positive warning (CID 1438046).

Dmitry Volyntsev xeioex at nginx.com
Fri Jul 20 13:35:54 UTC 2018


details:   http://hg.nginx.org/njs/rev/552da720e6e6
branches:  
changeset: 563:552da720e6e6
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Jul 20 16:09:50 2018 +0300
description:
Silenced Coverity false-positive warning (CID 1438046).

diffstat:

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

diffs (21 lines):

diff -r dc7cfa57a9f4 -r 552da720e6e6 nxt/nxt_dtoa.c
--- a/nxt/nxt_dtoa.c	Fri Jul 20 15:59:59 2018 +0300
+++ b/nxt/nxt_dtoa.c	Fri Jul 20 16:09:50 2018 +0300
@@ -280,7 +280,7 @@ nxt_prettify(char *start, size_t len, in
         /* 1234e7 -> 12340000000 */
 
         if (kk - length > 0) {
-            memset(&start[length], '0', kk - length);
+            memset(&start[length], (int) '0', kk - length);
         }
 
         return kk;
@@ -305,7 +305,7 @@ nxt_prettify(char *start, size_t len, in
         start[1] = '.';
 
         if (offset - 2 > 0) {
-            memset(&start[2], '0', offset - 2);
+            memset(&start[2], (int) '0', offset - 2);
         }
 
         return (length + offset);


More information about the nginx-devel mailing list