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

Issue 883873002: Fix truncation warning in PEImage on VS2015 (Closed)

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

Description

Fix truncation warning in PEImage on VS2015 d:\src\cr3\src\base\win\pe_image.h(250): error C2220: warning treated as error - no 'object' file generated d:\src\cr3\src\base\win\pe_image.h(250): warning C4302: 'reinterpret_cast': truncation from 'LPCSTR' to 'WORD' Separate ptr->int from truncation to WORD. Also, while we're here, fix a cast in IsOrdinal. R=cpu@chromium.org BUG=440500 Committed: https://crrev.com/85fd8b5480d2eb4a2f85f8bc6365969a6de259c3 Cr-Commit-Position: refs/heads/master@{#313543}

Patch Set 1 #

Total comments: 3

Patch Set 2 : IsOrdinal cast also #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -6 lines) Patch
M base/win/pe_image.h View 1 1 chunk +2 lines, -6 lines 1 comment Download

Messages

Total messages: 22 (4 generated)
scottmg
5 years, 11 months ago (2015-01-27 20:38:39 UTC) #1
grt (UTC plus 2)
https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h File base/win/pe_image.h (right): https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h#newcode245 base/win/pe_image.h:245: return reinterpret_cast<DWORD>(name) <= 0xFFFF; should this be return reinterpret_cast<uintptr_t>(name) ...
5 years, 11 months ago (2015-01-27 20:55:56 UTC) #3
Will Harris
On 2015/01/27 20:55:56, grt wrote: > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h > File base/win/pe_image.h (right): > > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h#newcode245 > ...
5 years, 11 months ago (2015-01-27 21:02:00 UTC) #4
scottmg
intptr_t == int on x86, right? So wouldn't 0x80000123 turn into a negative number a ...
5 years, 11 months ago (2015-01-27 21:12:09 UTC) #5
grt (UTC plus 2)
On 2015/01/27 21:02:00, Will Harris wrote: > On 2015/01/27 20:55:56, grt wrote: > > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h ...
5 years, 11 months ago (2015-01-27 21:16:58 UTC) #6
Will Harris
On 2015/01/27 21:12:09, scottmg wrote: > intptr_t == int on x86, right? So wouldn't 0x80000123 ...
5 years, 11 months ago (2015-01-27 21:19:00 UTC) #7
grt (UTC plus 2)
On 2015/01/27 21:19:00, Will Harris wrote: > On 2015/01/27 21:12:09, scottmg wrote: > > intptr_t ...
5 years, 11 months ago (2015-01-27 21:20:25 UTC) #8
Will Harris
oh sorry as usual I was looking at the wrong code (the code below with ...
5 years, 11 months ago (2015-01-27 21:22:03 UTC) #9
Will Harris
https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h File base/win/pe_image.h (right): https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h#newcode245 base/win/pe_image.h:245: return reinterpret_cast<DWORD>(name) <= 0xFFFF; On 2015/01/27 20:55:56, grt wrote: ...
5 years, 11 months ago (2015-01-27 21:36:04 UTC) #11
scottmg
On 2015/01/27 21:36:04, Will Harris wrote: > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h > File base/win/pe_image.h (right): > > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h#newcode245 ...
5 years, 11 months ago (2015-01-27 21:41:57 UTC) #12
scottmg
https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h File base/win/pe_image.h (right): https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h#newcode245 base/win/pe_image.h:245: return reinterpret_cast<DWORD>(name) <= 0xFFFF; On 2015/01/27 20:55:56, grt wrote: ...
5 years, 11 months ago (2015-01-27 21:42:04 UTC) #13
scottmg
On 2015/01/27 21:41:57, scottmg wrote: > On 2015/01/27 21:36:04, Will Harris wrote: > > https://codereview.chromium.org/883873002/diff/1/base/win/pe_image.h ...
5 years, 11 months ago (2015-01-27 21:45:32 UTC) #14
scottmg
On 2015/01/27 21:45:32, scottmg wrote: > On 2015/01/27 21:41:57, scottmg wrote: > > On 2015/01/27 ...
5 years, 11 months ago (2015-01-27 22:08:09 UTC) #15
grt (UTC plus 2)
On 2015/01/27 22:08:09, scottmg wrote: > On 2015/01/27 21:45:32, scottmg wrote: > > On 2015/01/27 ...
5 years, 10 months ago (2015-01-28 14:09:51 UTC) #17
grt (UTC plus 2)
lgtm https://codereview.chromium.org/883873002/diff/20001/base/win/pe_image.h File base/win/pe_image.h (right): https://codereview.chromium.org/883873002/diff/20001/base/win/pe_image.h#newcode242 base/win/pe_image.h:242: return reinterpret_cast<uintptr_t>(name) <= 0xFFFF; if you wanted intptr_t ...
5 years, 10 months ago (2015-01-28 14:12:12 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/883873002/20001
5 years, 10 months ago (2015-01-28 17:38:41 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 10 months ago (2015-01-28 18:26:08 UTC) #21
commit-bot: I haz the power
5 years, 10 months ago (2015-01-28 18:26:53 UTC) #22
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/85fd8b5480d2eb4a2f85f8bc6365969a6de259c3
Cr-Commit-Position: refs/heads/master@{#313543}

Powered by Google App Engine
This is Rietveld 408576698