From 18ae74cf9802ff2a65f87262c71d00ba8d68d133 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 7 Jul 2016 11:18:32 -0400 Subject: [PATCH] src: suppress coverity message Coverity marked a change in 630096b as a constant expression. However, on platforms where sizeof(int64_t) > sizeof(size_t), this should not be the case. This commit flags the comparison as OK to coverity. PR-URL: https://github.com/nodejs/node/pull/7587 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- src/node_buffer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 57bfb87de05b04..1ce1dd5f1f2015 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -209,6 +209,7 @@ inline MUST_USE_RESULT bool ParseArrayIndex(Local arg, // Check that the result fits in a size_t. const uint64_t kSizeMax = static_cast(static_cast(-1)); + // coverity[pointless_expression] if (static_cast(tmp_i) > kSizeMax) return false;