Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "tools: fix compiler warning in inspector_protocol"
This reverts commit ffb34b6.
  • Loading branch information
Trott committed Aug 7, 2021
commit 7adf75d9d5ee634d0d9ec26b31f603e3d2f23ea0
5 changes: 2 additions & 3 deletions tools/inspector_protocol/encoding/encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
// inspector_protocol, it's not a CBOR limitation), so we check
// against the signed max, so that the allowable values are
// 0, 1, 2, ... 2^31 - 1.
if (!success ||
static_cast<int64_t>(std::numeric_limits<int32_t>::max()) <
static_cast<int64_t>(token_start_internal_value_)) {
if (!success || std::numeric_limits<int32_t>::max() <
token_start_internal_value_) {
SetError(Error::CBOR_INVALID_INT32);
return;
}
Expand Down
5 changes: 2 additions & 3 deletions tools/inspector_protocol/lib/encoding_cpp.template
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
// inspector_protocol, it's not a CBOR limitation), so we check
// against the signed max, so that the allowable values are
// 0, 1, 2, ... 2^31 - 1.
if (!success ||
static_cast<int64_t>(std::numeric_limits<int32_t>::max()) <
static_cast<int64_t>(token_start_internal_value_)) {
if (!success || std::numeric_limits<int32_t>::max() <
token_start_internal_value_) {
SetError(Error::CBOR_INVALID_INT32);
return;
}
Expand Down