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

Issue 1684963003: Use double cast to avoid VS 2015 64-bit warning (Closed)

Created:
4 years, 10 months ago by brucedawson
Modified:
4 years, 10 months ago
Reviewers:
jschuh, Nico
CC:
chromium-reviews, wfh+watch_chromium.org, rickyz+watch_chromium.org, liamjm (20p)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use double cast to avoid VS 2015 64-bit warning If you convert a 64-bit pointer directly to a 32-bit or smaller integer then VS 2015 guesses (not unreasonably) that it might be an accidental pointer truncation. The standard fix is to use a double-cast, to a pointer-sized integer and then to DWORD. This fixes a C4311 "pointer truncation" warning introduced by crrev.com/1225183003 Warning C4312 (conversion from int to ptr of greater size) is suppressed in this project but adding double-casts for the reverse conversion keeps the code symmetrical and allows us to enable C4312 in the future. BUG=440500 Committed: https://crrev.com/e1325fa72f95c4837d19993606954ed0b258be67 Cr-Commit-Position: refs/heads/master@{#374828}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Double casts for DWORD to ptr also #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M sandbox/win/src/process_policy_test.cc View 1 3 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
brucedawson
4 years, 10 months ago (2016-02-10 23:43:56 UTC) #3
Nico
https://codereview.chromium.org/1684963003/diff/1/sandbox/win/src/process_policy_test.cc File sandbox/win/src/process_policy_test.cc (right): https://codereview.chromium.org/1684963003/diff/1/sandbox/win/src/process_policy_test.cc#newcode317 sandbox/win/src/process_policy_test.cc:317: reinterpret_cast<LPVOID>(pid), 0, &thread_id); this should have a double cast ...
4 years, 10 months ago (2016-02-10 23:48:12 UTC) #4
brucedawson
https://codereview.chromium.org/1684963003/diff/1/sandbox/win/src/process_policy_test.cc File sandbox/win/src/process_policy_test.cc (right): https://codereview.chromium.org/1684963003/diff/1/sandbox/win/src/process_policy_test.cc#newcode317 sandbox/win/src/process_policy_test.cc:317: reinterpret_cast<LPVOID>(pid), 0, &thread_id); On 2016/02/10 23:48:12, Nico wrote: > ...
4 years, 10 months ago (2016-02-11 00:02:54 UTC) #6
Nico
lgtm
4 years, 10 months ago (2016-02-11 00:04:03 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684963003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684963003/20001
4 years, 10 months ago (2016-02-11 00:14:57 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/144982)
4 years, 10 months ago (2016-02-11 00:24:01 UTC) #11
brucedawson
Adding an owner for review. jschuh@ can you take a look?
4 years, 10 months ago (2016-02-11 00:26:38 UTC) #13
jschuh
lgtm
4 years, 10 months ago (2016-02-11 00:51:33 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684963003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684963003/20001
4 years, 10 months ago (2016-02-11 01:29:43 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-11 01:36:22 UTC) #18
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:33:51 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e1325fa72f95c4837d19993606954ed0b258be67
Cr-Commit-Position: refs/heads/master@{#374828}

Powered by Google App Engine
This is Rietveld 408576698