mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
platform.h (lines 552-553): _BitScanReverse #323
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dejanyy on GitHub (May 22, 2020).
On lines 552-553 of platform.h we have:
uint32_t msb;
_BitScanReverse(&msb, x);
I think "uint32_t msb;" is wrong. Certainly doesn't compile with MS Visual Studio 2017. Changing that line to "unsigned long msb;" seems to fix the problem. See:
https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanreverse-bitscanreverse64?view=vs-2019
@eustas commented on GitHub (Jul 2, 2020):
Indeed! I believe it is compiled in CI only by an accident (when
uint32_tis the same type asunsigned long).Going to fix soon. Thanks for the report!