mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
Fix -Wno-sometimes-uninitialized by initializing "result" in parse_sax
The function parse_sax() returns sometimes-uninitialized warnings in some compilers. This commit fixes that.
This commit is contained in:
@ -64,7 +64,7 @@ class binary_reader
|
|||||||
const bool strict = true)
|
const bool strict = true)
|
||||||
{
|
{
|
||||||
sax = sax_;
|
sax = sax_;
|
||||||
bool result;
|
bool result = false;
|
||||||
|
|
||||||
switch (format)
|
switch (format)
|
||||||
{
|
{
|
||||||
|
@ -6033,7 +6033,7 @@ class binary_reader
|
|||||||
const bool strict = true)
|
const bool strict = true)
|
||||||
{
|
{
|
||||||
sax = sax_;
|
sax = sax_;
|
||||||
bool result;
|
bool result = false;
|
||||||
|
|
||||||
switch (format)
|
switch (format)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user