mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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 <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
1 parent
6ba3ad5d34
commit
72be320962
1 file changed
+1
@@ -187,6 +187,7 @@ inline MUST_USE_RESULT bool ParseArrayIndex(Local<Value> arg,
|
||||
|
||||
// Check that the result fits in a size_t.
|
||||
const uint64_t kSizeMax = static_cast<uint64_t>(static_cast<size_t>(-1));
|
||||
// coverity[pointless_expression]
|
||||
if (static_cast<uint64_t>(tmp_i) > kSizeMax)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user