Tautologous DCHECKs in net/quic implementation |
||||
Issue descriptionReplacing DCHECK_OP()'s implementation with DCHECK((val1) op (val2)) in a debug build gives two compilation errors in net/quic: https://code.google.com/p/chromium/codesearch#chromium/src/net/quic/quic_data_reader.cc&q=quic_data_reader.c&sq=package:chromium&l=57 bool QuicDataReader::ReadUFloat16(uint64_t* result) { uint16_t value; if (!ReadUInt16(&value)) { return false; } ... *result -= exponent << kUFloat16MantissaBits; *result <<= exponent; DCHECK_GE(value, 1 << kUFloat16MantissaEffectiveBits); -> DCHECK_LE(value, kUFloat16MaxValue); return true; } https://code.google.com/p/chromium/codesearch#chromium/src/net/quic/quic_protocol.cc&q=quic_protocol.cc&sq=package:chromium&l=312 QuicRstStreamFrame::QuicRstStreamFrame(QuicStreamId stream_id, QuicRstStreamErrorCode error_code, QuicStreamOffset bytes_written) : stream_id(stream_id), error_code(error_code), byte_offset(bytes_written) { -> DCHECK_LE(error_code, numeric_limits<uint8_t>::max()); }
,
Apr 14 2016
,
Apr 14 2016
,
Apr 28 2016
Fixed in the internal repo, and should roll to Chromium next week.
,
May 10 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by w...@chromium.org
, Mar 19 2016