Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 761863002: Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. (Closed)

Created:
6 years ago by Peter Kasting
Modified:
6 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ryan Hamilton, Ian Swett
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. The existing code is very inconsistent about whether it uses typedefs like QuickByteCount and QuicPacketCount or whether it instead uses fundamental types like uint32, uint64, and size_t. This is not only more confusing to read, in some cases it leads to MSVC warning about "possibly truncated value" when one type is implicitly converted to another, shorter one. This attempts to fix at least some of these sorts of problems by using the typedefed types more widely when possible, or else at least the same basic types other places are already using. It also fixes various warnings by including explicit casts (sometimes with legality checks). BUG=81439 TEST=none Committed: https://crrev.com/a9f22d4e065a52096ba58961d56a5e86a5a42675 Cr-Commit-Position: refs/heads/master@{#306276}

Patch Set 1 #

Patch Set 2 : More work #

Total comments: 3

Patch Set 3 : Fix compile #

Patch Set 4 : Compile fix #2 #

Patch Set 5 : Compile fix #3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -224 lines) Patch
M net/http/http_server_properties.h View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M net/quic/congestion_control/cube_root.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M net/quic/congestion_control/cubic.h View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/congestion_control/cubic.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/congestion_control/cubic_test.cc View 7 chunks +17 lines, -17 lines 0 comments Download
M net/quic/congestion_control/rtt_stats.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/congestion_control/tcp_cubic_sender.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/quic/congestion_control/tcp_loss_algorithm.h View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/crypto/cert_compressor.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/crypto/crypto_framer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/quic/crypto/crypto_utils.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M net/quic/crypto/p256_key_exchange_nss.cc View 2 chunks +2 lines, -1 line 0 comments Download
M net/quic/crypto/quic_crypto_server_config.cc View 2 chunks +14 lines, -6 lines 0 comments Download
M net/quic/crypto/source_address_token.h View 2 chunks +3 lines, -0 lines 0 comments Download
M net/quic/crypto/source_address_token.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/crypto/strike_register.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M net/quic/quic_bandwidth.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_client_session.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/quic/quic_config.h View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_config.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M net/quic/quic_connection.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_connection.cc View 1 4 chunks +6 lines, -6 lines 0 comments Download
M net/quic/quic_connection_logger.h View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_connection_logger.cc View 1 2 8 chunks +27 lines, -16 lines 0 comments Download
M net/quic/quic_connection_stats.h View 1 3 chunks +34 lines, -27 lines 0 comments Download
M net/quic/quic_connection_stats.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M net/quic/quic_connection_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/quic_crypto_client_stream.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M net/quic/quic_data_writer.cc View 5 chunks +9 lines, -12 lines 0 comments Download
M net/quic/quic_fec_group.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/quic/quic_flow_controller.h View 1 3 chunks +17 lines, -17 lines 0 comments Download
M net/quic/quic_flow_controller.cc View 1 6 chunks +11 lines, -9 lines 0 comments Download
M net/quic/quic_flow_controller_test.cc View 1 5 chunks +7 lines, -10 lines 0 comments Download
M net/quic/quic_framer.cc View 6 chunks +17 lines, -13 lines 0 comments Download
M net/quic/quic_protocol.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_received_packet_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/quic_sent_packet_manager.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_server.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/quic/quic_session.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/quic_session.cc View 1 4 chunks +5 lines, -4 lines 0 comments Download
M net/quic/quic_stream_factory.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M net/quic/quic_stream_sequencer.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M net/quic/quic_time.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/quic/quic_unacked_packet_map.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/quic/quic_unacked_packet_map.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_utils.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M net/quic/reliable_quic_stream.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M net/quic/reliable_quic_stream.cc View 1 7 chunks +9 lines, -7 lines 0 comments Download
M net/quic/test_tools/quic_flow_controller_peer.h View 1 1 chunk +8 lines, -7 lines 0 comments Download
M net/quic/test_tools/quic_flow_controller_peer.cc View 1 1 chunk +8 lines, -7 lines 0 comments Download
M net/quic/test_tools/quic_sent_packet_manager_peer.h View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/test_tools/quic_sent_packet_manager_peer.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (2 generated)
Peter Kasting
This patch isn't nearly a complete fix for the described issues, but I wanted to ...
6 years ago (2014-11-27 01:58:37 UTC) #2
chromium-reviews
Hi Peter, Many many thanks for doing this cleanup. I will port this CL into ...
6 years ago (2014-11-27 02:11:49 UTC) #3
Peter Kasting
On 2014/11/27 02:11:49, chromium-reviews wrote: > Hi Peter, > Many many thanks for doing this ...
6 years ago (2014-11-27 02:13:34 UTC) #4
chromium-reviews
Will test after the trybots tun green. On Wed, Nov 26, 2014 at 6:13 PM, ...
6 years ago (2014-11-27 02:17:55 UTC) #5
ramant (doing other things)
LGTM.
6 years ago (2014-11-30 21:38:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/761863002/80001
6 years ago (2014-12-01 22:40:25 UTC) #8
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-12-01 22:43:55 UTC) #9
commit-bot: I haz the power
6 years ago (2014-12-01 22:44:38 UTC) #10
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a9f22d4e065a52096ba58961d56a5e86a5a42675
Cr-Commit-Position: refs/heads/master@{#306276}

Powered by Google App Engine
This is Rietveld 408576698