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

Issue 941933002: win vs2015: fix variable shadowing warnings in net/quic (Closed)

Created:
5 years, 10 months ago by scottmg
Modified:
5 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

win vs2015: fix variable shadowing warnings in net/quic d:\src\cr2\src\net\quic\crypto\cert_compressor.cc(198): error C2220: warning treated as error - no 'object' file generated d:\src\cr2\src\net\quic\crypto\cert_compressor.cc(198): warning C4456: declaration of 'i' hides previous local declaration d:\src\cr2\src\net\quic\crypto\cert_compressor.cc(189): note: see declaration of 'i' d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(668): error C2220: warning treated as error - no 'object' file generated d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(668): warning C4456: declaration of 'client_hello_serialized' hides previous local declaration d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(652): note: see declaration of 'client_hello_serialized' d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1336): warning C4456: declaration of 'i' hides previous local declaration d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1292): note: see declaration of 'i' d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1481): warning C4457: declaration of 'token' hides function parameter d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1472): note: see declaration of 'token' d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1493): warning C4457: declaration of 'token' hides function parameter d:\src\cr2\src\net\quic\crypto\quic_crypto_server_config.cc(1472): note: see declaration of 'token' d:\src\cr2\src\net\quic\crypto\strike_register.cc(498): error C2220: warning treated as error - no 'object' file generated d:\src\cr2\src\net\quic\crypto\strike_register.cc(498): warning C4456: declaration of 'i' hides previous local declaration d:\src\cr2\src\net\quic\crypto\strike_register.cc(453): note: see declaration of 'i' c:\program files (x86)\microsoft visual studio 14.0\vc\include\utility(151): note: while compiling class template member function 'std::pair<uint32,uint32>::pair<uint32,uint32,void>(std::pair<uint32,uint32> &&) noexcept' d:\src\cr2\src\net\quic\crypto\strike_register.cc(502): warning C4456: declaration of 'bit' hides previous local declaration d:\src\cr2\src\net\quic\crypto\strike_register.cc(454): note: see declaration of 'bit' ninja: build stopped: subcommand failed. d:\src\cr2\src\net\quic\quic_framer.cc(1350): error C2220: warning treated as error - no 'object' file generated d:\src\cr2\src\net\quic\quic_framer.cc(1350): warning C4456: declaration of 'i' hides previous local declaration d:\src\cr2\src\net\quic\quic_framer.cc(1338): note: see declaration of 'i' d:\src\cr2\src\net\quic\quic_framer.cc(2102): warning C4456: declaration of 'time_delta_us' hides previous local declaration d:\src\cr2\src\net\quic\quic_framer.cc(2080): note: see declaration of 'time_delta_us' ninja: build stopped: subcommand failed. BUG=440500 R=rtenneti@chromium.org Committed: https://crrev.com/356a110050a17a19bf9168fadc0a1acb828c582b Cr-Commit-Position: refs/heads/master@{#317370}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -24 lines) Patch
M net/quic/crypto/cert_compressor.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M net/quic/crypto/quic_crypto_server_config.cc View 4 chunks +15 lines, -12 lines 0 comments Download
M net/quic/crypto/strike_register.cc View 1 chunk +5 lines, -5 lines 2 comments Download
M net/quic/quic_framer.cc View 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
scottmg
5 years, 10 months ago (2015-02-20 05:21:42 UTC) #1
ramant (doing other things)
lgtm
5 years, 10 months ago (2015-02-20 18:15:25 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/941933002/1
5 years, 10 months ago (2015-02-20 19:21:59 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 10 months ago (2015-02-20 19:29:56 UTC) #5
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/356a110050a17a19bf9168fadc0a1acb828c582b Cr-Commit-Position: refs/heads/master@{#317370}
5 years, 10 months ago (2015-02-20 19:30:37 UTC) #6
ramant (doing other things)
https://codereview.chromium.org/941933002/diff/1/net/quic/crypto/strike_register.cc File net/quic/crypto/strike_register.cc (right): https://codereview.chromium.org/941933002/diff/1/net/quic/crypto/strike_register.cc#newcode502 net/quic/crypto/strike_register.cc:502: bit = j->first % 8; IMO, we should define ...
5 years, 10 months ago (2015-02-20 20:04:07 UTC) #7
scottmg
5 years, 10 months ago (2015-02-20 20:30:51 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/941933002/diff/1/net/quic/crypto/strike_regis...
File net/quic/crypto/strike_register.cc (right):

https://codereview.chromium.org/941933002/diff/1/net/quic/crypto/strike_regis...
net/quic/crypto/strike_register.cc:502: bit = j->first % 8;
On 2015/02/20 20:04:07, ramant wrote:
> IMO, we should define a "unsigned bit_new = ..." and use that. We shouldn't
> modify the original bit. Sorry to have missed that (to keep the logic same as
> before).
> 
> Will fix it in the next cl. This code is not used in chromium's clise side
code.

Shoot, I didn't notice it might be used in the else arm without going here
first. Fix here: https://codereview.chromium.org/946003003

Powered by Google App Engine
This is Rietveld 408576698