mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Fixed warning "maybe uninitialized" (issue #909)
This commit is contained in:
@@ -23,6 +23,7 @@ inline JsonVariant::JsonVariant(const JsonArray &array) {
|
||||
_content.asArray = const_cast<JsonArray *>(&array);
|
||||
} else {
|
||||
_type = Internals::JSON_UNDEFINED;
|
||||
_content.asArray = 0; // <- prevent warning 'maybe-uninitialized'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +33,7 @@ inline JsonVariant::JsonVariant(const JsonObject &object) {
|
||||
_content.asObject = const_cast<JsonObject *>(&object);
|
||||
} else {
|
||||
_type = Internals::JSON_UNDEFINED;
|
||||
_content.asObject = 0; // <- prevent warning 'maybe-uninitialized'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user