Skip to content

Commit

Permalink
Revert "tools: fix compiler warning in inspector_protocol"
Browse files Browse the repository at this point in the history
This reverts commit ffb34b6.

PR-URL: #39694
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and targos committed Sep 4, 2021
1 parent b95a759 commit 383fa01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
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

0 comments on commit 383fa01

Please sign in to comment.