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
586fdee8
Commit
586fdee8
authored
Jan 06, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3494 from parnic/fix-vs2012-static-analysis
Fixed MS static analysis warnings
parents
316854c2
178f768f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
util.h
include/flatbuffers/util.h
+1
-1
idl_parser.cpp
src/idl_parser.cpp
+2
-2
No files found.
include/flatbuffers/util.h
View file @
586fdee8
...
@@ -210,7 +210,7 @@ inline void EnsureDirExists(const std::string &filepath) {
...
@@ -210,7 +210,7 @@ inline void EnsureDirExists(const std::string &filepath) {
auto
parent
=
StripFileName
(
filepath
);
auto
parent
=
StripFileName
(
filepath
);
if
(
parent
.
length
())
EnsureDirExists
(
parent
);
if
(
parent
.
length
())
EnsureDirExists
(
parent
);
#ifdef _WIN32
#ifdef _WIN32
_mkdir
(
filepath
.
c_str
());
(
void
)
_mkdir
(
filepath
.
c_str
());
#else
#else
mkdir
(
filepath
.
c_str
(),
S_IRWXU
|
S_IRGRP
|
S_IXGRP
);
mkdir
(
filepath
.
c_str
(),
S_IRWXU
|
S_IRGRP
|
S_IXGRP
);
#endif
#endif
...
...
src/idl_parser.cpp
View file @
586fdee8
...
@@ -191,7 +191,7 @@ std::string Parser::TokenToStringId(int t) {
...
@@ -191,7 +191,7 @@ std::string Parser::TokenToStringId(int t) {
// Parses exactly nibbles worth of hex digits into a number, or error.
// Parses exactly nibbles worth of hex digits into a number, or error.
CheckedError
Parser
::
ParseHexNum
(
int
nibbles
,
int64_t
*
val
)
{
CheckedError
Parser
::
ParseHexNum
(
int
nibbles
,
int64_t
*
val
)
{
for
(
int
i
=
0
;
i
<
nibbles
;
i
++
)
for
(
int
i
=
0
;
i
<
nibbles
;
i
++
)
if
(
!
isxdigit
(
cursor_
[
i
]
))
if
(
!
isxdigit
(
static_cast
<
const
unsigned
char
>
(
cursor_
[
i
])
))
return
Error
(
"escape code must be followed by "
+
NumToString
(
nibbles
)
+
return
Error
(
"escape code must be followed by "
+
NumToString
(
nibbles
)
+
" hex digits"
);
" hex digits"
);
std
::
string
target
(
cursor_
,
cursor_
+
nibbles
);
std
::
string
target
(
cursor_
,
cursor_
+
nibbles
);
...
@@ -214,7 +214,7 @@ CheckedError Parser::Next() {
...
@@ -214,7 +214,7 @@ CheckedError Parser::Next() {
case
'{'
:
case
'}'
:
case
'('
:
case
')'
:
case
'['
:
case
']'
:
case
'{'
:
case
'}'
:
case
'('
:
case
')'
:
case
'['
:
case
']'
:
case
','
:
case
':'
:
case
';'
:
case
'='
:
return
NoError
();
case
','
:
case
':'
:
case
';'
:
case
'='
:
return
NoError
();
case
'.'
:
case
'.'
:
if
(
!
isdigit
(
*
cursor_
))
return
NoError
();
if
(
!
isdigit
(
static_cast
<
const
unsigned
char
>
(
*
cursor_
)
))
return
NoError
();
return
Error
(
"floating point constant can
\'
t start with
\"
.
\"
"
);
return
Error
(
"floating point constant can
\'
t start with
\"
.
\"
"
);
case
'\"'
:
case
'\"'
:
case
'\''
:
case
'\''
:
...
...
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