From 383fa01e975bc01426ee8dc75c0606646f8eb8fb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 6 Aug 2021 21:25:59 -0700 Subject: [PATCH] Revert "tools: fix compiler warning in inspector_protocol" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ffb34b6d5dbf002f182f08e45c32883d7174be8b. PR-URL: https://github.com/nodejs/node/pull/39694 Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log Reviewed-By: Michaël Zasso Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- tools/inspector_protocol/encoding/encoding.cc | 5 ++--- tools/inspector_protocol/lib/encoding_cpp.template | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/inspector_protocol/encoding/encoding.cc b/tools/inspector_protocol/encoding/encoding.cc index 7eb499f9712..9a869bbbee2 100644 --- a/tools/inspector_protocol/encoding/encoding.cc +++ b/tools/inspector_protocol/encoding/encoding.cc @@ -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(std::numeric_limits::max()) < - static_cast(token_start_internal_value_)) { + if (!success || std::numeric_limits::max() < + token_start_internal_value_) { SetError(Error::CBOR_INVALID_INT32); return; } diff --git a/tools/inspector_protocol/lib/encoding_cpp.template b/tools/inspector_protocol/lib/encoding_cpp.template index c5b6489652a..d24e9286a12 100644 --- a/tools/inspector_protocol/lib/encoding_cpp.template +++ b/tools/inspector_protocol/lib/encoding_cpp.template @@ -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(std::numeric_limits::max()) < - static_cast(token_start_internal_value_)) { + if (!success || std::numeric_limits::max() < + token_start_internal_value_) { SetError(Error::CBOR_INVALID_INT32); return; }