Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
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
rapidjson
Commits
8bf4f7b9
Unverified
Commit
8bf4f7b9
authored
Mar 04, 2018
by
Milo Yip
Committed by
GitHub
Mar 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1188 from Martinfx/master
Fix warnings: dereference of null pointer
parents
9dfc4374
72481d5a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
itoa.h
include/rapidjson/internal/itoa.h
+5
-0
No files found.
include/rapidjson/internal/itoa.h
View file @
8bf4f7b9
...
@@ -37,6 +37,8 @@ inline const char* GetDigitsLut() {
...
@@ -37,6 +37,8 @@ inline const char* GetDigitsLut() {
}
}
inline
char
*
u32toa
(
uint32_t
value
,
char
*
buffer
)
{
inline
char
*
u32toa
(
uint32_t
value
,
char
*
buffer
)
{
RAPIDJSON_ASSERT
(
buffer
!=
0
);
const
char
*
cDigitsLut
=
GetDigitsLut
();
const
char
*
cDigitsLut
=
GetDigitsLut
();
if
(
value
<
10000
)
{
if
(
value
<
10000
)
{
...
@@ -111,6 +113,7 @@ inline char* u32toa(uint32_t value, char* buffer) {
...
@@ -111,6 +113,7 @@ inline char* u32toa(uint32_t value, char* buffer) {
}
}
inline
char
*
i32toa
(
int32_t
value
,
char
*
buffer
)
{
inline
char
*
i32toa
(
int32_t
value
,
char
*
buffer
)
{
RAPIDJSON_ASSERT
(
buffer
!=
0
);
uint32_t
u
=
static_cast
<
uint32_t
>
(
value
);
uint32_t
u
=
static_cast
<
uint32_t
>
(
value
);
if
(
value
<
0
)
{
if
(
value
<
0
)
{
*
buffer
++
=
'-'
;
*
buffer
++
=
'-'
;
...
@@ -121,6 +124,7 @@ inline char* i32toa(int32_t value, char* buffer) {
...
@@ -121,6 +124,7 @@ inline char* i32toa(int32_t value, char* buffer) {
}
}
inline
char
*
u64toa
(
uint64_t
value
,
char
*
buffer
)
{
inline
char
*
u64toa
(
uint64_t
value
,
char
*
buffer
)
{
RAPIDJSON_ASSERT
(
buffer
!=
0
);
const
char
*
cDigitsLut
=
GetDigitsLut
();
const
char
*
cDigitsLut
=
GetDigitsLut
();
const
uint64_t
kTen8
=
100000000
;
const
uint64_t
kTen8
=
100000000
;
const
uint64_t
kTen9
=
kTen8
*
10
;
const
uint64_t
kTen9
=
kTen8
*
10
;
...
@@ -289,6 +293,7 @@ inline char* u64toa(uint64_t value, char* buffer) {
...
@@ -289,6 +293,7 @@ inline char* u64toa(uint64_t value, char* buffer) {
}
}
inline
char
*
i64toa
(
int64_t
value
,
char
*
buffer
)
{
inline
char
*
i64toa
(
int64_t
value
,
char
*
buffer
)
{
RAPIDJSON_ASSERT
(
buffer
!=
0
);
uint64_t
u
=
static_cast
<
uint64_t
>
(
value
);
uint64_t
u
=
static_cast
<
uint64_t
>
(
value
);
if
(
value
<
0
)
{
if
(
value
<
0
)
{
*
buffer
++
=
'-'
;
*
buffer
++
=
'-'
;
...
...
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