Skip to content

Commit c6323d8

Browse files
Trottdanielleadams
authored andcommitted
Revert "tools: fix compiler warning in inspector_protocol"
This reverts commit ffb34b6. PR-URL: #39694 Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 6e19c16 commit c6323d8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

tools/inspector_protocol/encoding/encoding.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
833833
// inspector_protocol, it's not a CBOR limitation), so we check
834834
// against the signed max, so that the allowable values are
835835
// 0, 1, 2, ... 2^31 - 1.
836-
if (!success ||
837-
static_cast<int64_t>(std::numeric_limits<int32_t>::max()) <
838-
static_cast<int64_t>(token_start_internal_value_)) {
836+
if (!success || std::numeric_limits<int32_t>::max() <
837+
token_start_internal_value_) {
839838
SetError(Error::CBOR_INVALID_INT32);
840839
return;
841840
}

tools/inspector_protocol/lib/encoding_cpp.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
840840
// inspector_protocol, it's not a CBOR limitation), so we check
841841
// against the signed max, so that the allowable values are
842842
// 0, 1, 2, ... 2^31 - 1.
843-
if (!success ||
844-
static_cast<int64_t>(std::numeric_limits<int32_t>::max()) <
845-
static_cast<int64_t>(token_start_internal_value_)) {
843+
if (!success || std::numeric_limits<int32_t>::max() <
844+
token_start_internal_value_) {
846845
SetError(Error::CBOR_INVALID_INT32);
847846
return;
848847
}

0 commit comments

Comments
 (0)