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:
Родитель
89ede72fca
Коммит
18ae74cf98
|
@ -209,6 +209,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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче