Skip to content

Commit 72be320

Browse files
cjihrigMylesBorins
authored andcommitted
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: #7587 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 6ba3ad5 commit 72be320

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_buffer.cc

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ inline MUST_USE_RESULT bool ParseArrayIndex(Local<Value> arg,
187187

188188
// Check that the result fits in a size_t.
189189
const uint64_t kSizeMax = static_cast<uint64_t>(static_cast<size_t>(-1));
190+
// coverity[pointless_expression]
190191
if (static_cast<uint64_t>(tmp_i) > kSizeMax)
191192
return false;
192193

0 commit comments

Comments
 (0)