diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-02-14 15:58:57 -0800 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-02-16 22:45:41 -0800 |
commit | 67fd2a8bece9b4ecad4d0bef2d357245492a66bb (patch) | |
tree | af8b4f4e9fbe969934e1751a268549f60ae80b62 /src | |
parent | 63230c06a8d98f4326de5d1a2ef6e908ed6a5945 (diff) | |
download | binaryen-67fd2a8bece9b4ecad4d0bef2d357245492a66bb.tar.gz binaryen-67fd2a8bece9b4ecad4d0bef2d357245492a66bb.tar.bz2 binaryen-67fd2a8bece9b4ecad4d0bef2d357245492a66bb.zip |
fix a sign/unsigned compare compiler warning
Diffstat (limited to 'src')
-rw-r--r-- | src/ast/bits.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ast/bits.h b/src/ast/bits.h index 102ce30e0..d88cb5edb 100644 --- a/src/ast/bits.h +++ b/src/ast/bits.h @@ -31,8 +31,8 @@ struct Bits { // checks if the input is a mask of lower bits, i.e., all 1s up to some high bit, and all zeros // from there. returns the number of masked bits, or 0 if this is not such a mask - static uint32_t getMaskedBits(int32_t mask) { - if (mask == -1) return 32; // all the bits + static uint32_t getMaskedBits(uint32_t mask) { + if (mask == uint32_t(-1)) return 32; // all the bits if (mask == 0) return 0; // trivially not a mask // otherwise, see if adding one turns this into a 1-bit thing, 00011111 + 1 => 00100000 if (PopCount(mask + 1) != 1) return 0; |