google / cityhash

Automatically exported from code.google.com/p/cityhash
MIT License
1.1k stars 183 forks source link

Address MSVC 64-bit compile warnings. #19

Open toojays opened 8 years ago

toojays commented 8 years ago

MSVC 2015 emitted a handful of truncation errors about implicitly converting from a size_t length argument to a uint32 or long. These all look intentional or benign. This commit adds casts to silence the warnings.

The errors addressed are:

3>external\city.cc(170): error C2220: warning treated as error - no 'object' file generated
3>external\city.cc(170): warning C4267: 'initializing': conversion from 'size_t' to 'uint32', possible loss of data
3>external\city.cc(183): warning C4267: 'argument': conversion from 'size_t' to 'uint32', possible loss of data
3>external\city.cc(187): warning C4267: 'initializing': conversion from 'size_t' to 'uint32', possible loss of data
3>external\city.cc(202): warning C4267: 'initializing': conversion from 'size_t' to 'uint32', possible loss of data
3>external\city.cc(307): warning C4267: 'initializing': conversion from 'size_t' to 'uint32', possible loss of data
3>external\city.cc(425): warning C4267: 'initializing': conversion from 'size_t' to 'long', possible loss of data
googlebot commented 8 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


toojays commented 8 years ago

I'm now covered by a corporate agreement.

googlebot commented 8 years ago

CLAs look good, thanks!

lord-ne commented 1 year ago

This may have been superceded by the most recently merged pull request?