Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
aeff09d7
Commit
aeff09d7
authored
Aug 26, 2015
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a clang warning about signed shifts.
Change-Id: I7c2bf87972ee0ba6811d6ed42e13300bff90e36f
parent
a5c51157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
idl_parser.cpp
src/idl_parser.cpp
+2
-1
No files found.
src/idl_parser.cpp
View file @
aeff09d7
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment