projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5c5115
)
Fixed a clang warning about signed shifts.
author
Wouter van Oortmerssen
<wvo@google.com>
Wed, 26 Aug 2015 23:47:59 +0000
(16:47 -0700)
committer
Wouter van Oortmerssen
<wvo@google.com>
Wed, 26 Aug 2015 23:47:59 +0000
(16:47 -0700)
Change-Id: I7c2bf87972ee0ba6811d6ed42e13300bff90e36f
src/idl_parser.cpp
patch
|
blob
|
history
diff --git
a/src/idl_parser.cpp
b/src/idl_parser.cpp
index
ad5ff2a
..
077320b
100644
(file)
--- a/
src/idl_parser.cpp
+++ b/
src/idl_parser.cpp
@@
-49,7
+49,8
@@
static void Error(const std::string &msg) {
// Ensure that integer values we parse fit inside the declared integer type.
static void CheckBitsFit(int64_t val, size_t bits) {
- auto mask = (1ll << bits) - 1; // Bits we allow to be used.
+ // Bits we allow to be used.
+ auto mask = static_cast<int64_t>((1ull << bits) - 1);
if (bits < 64 &&
(val & ~mask) != 0 && // Positive or unsigned.
(val | mask) != -1) // Negative.