Skip to content
Commit eb7fac2e authored by brucedawson's avatar brucedawson Committed by Commit bot
Browse files

Fix VC++ 2015 64-bit truncation warning in zlib

VC++ 2015 64-bit builds were giving this warning:
crc_folding.c(286): warning C4311: 'type cast': pointer truncation from
  'const unsigned char *' to 'unsigned long'

Converting from unsigned char* to long is normally dodgy but is safe in
this case because of the masking with 0xF. Casting through uintptr_t is
sufficient to allay VC++'s fears that we are making a mistake.

R=pkasting@chromium.org,gavinp@chromium.org
BUG=440500

Review URL: https://codereview.chromium.org/1384773002

Cr-Original-Commit-Position: refs/heads/master@{#352900}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b474ca01fcc5376eb538f71e524351e52319d396
parent 3f3d1260
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment