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 Review URL: https://codereview.chromium.org/1684963003 Cr-Commit-Position: refs/heads/master@{#374828}
Loading
Please register or sign in to comment