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

Issue 809303003: win: Add static_cast to AssignIfInRange (Closed)

Created:
6 years ago by scottmg
Modified:
6 years ago
Reviewers:
Mark Mentovai
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@file-writer-3
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

win: Add static_cast to AssignIfInRange Otherwise, when assigning to a smaller type, MSVC warns e.g. d:\src\crashpad\crashpad\util\numeric\safe_assignment.h(38) : error C2220: warning treated as error - no 'object' file generated d:\src\crashpad\crashpad\util\file\string_file_writer.cc(127) : see reference to function template instantiation 'bool crashpad::AssignIfInRange<size_t,FileOffset>(Destination *,Source)' being compiled with [ Destination=size_t , Source=FileOffset ] d:\src\crashpad\crashpad\util\numeric\safe_assignment.h(38) : warning C4244: '=' : conversion from 'FileOffset' to 'size_t', possible loss of data R=mark@chromium.org BUG=crashpad:1 Committed: https://chromium.googlesource.com/crashpad/crashpad/+/ec38bf152d53f29cdddd3384cddc161fc4fc963a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M util/numeric/safe_assignment.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (1 generated)
scottmg
6 years ago (2014-12-18 07:03:29 UTC) #1
Mark Mentovai
LGTM
6 years ago (2014-12-18 13:34:56 UTC) #2
scottmg
6 years ago (2014-12-18 16:42:31 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
ec38bf152d53f29cdddd3384cddc161fc4fc963a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698