Latest version gives compiler errors
Created by: vortex314
Latest version 6.x Compiling for ESP32 with Xtensa I can manually avoid this issues by initializing 'value' and 'key' to "".
/home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp: In member function 'ArduinoJson6150_1100000::DeserializationError ArduinoJson6150_1100000::JsonDeserializer<TReader, TStringStorage>::parseVariant(ArduinoJson6150_1100000::VariantData&, TFilter, ArduinoJson6150_1100000::NestingLimit) [with TFilter = ArduinoJson6150_1100000::AllowAllFilter; TReader = ArduinoJson6150_1100000::Reader<std::__cxx11::basic_string, void>; TStringStorage = ArduinoJson6150_1100000::StringCopier]': /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:339:27: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] variant.setOwnedString(make_not_null(value)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:335:17: note: 'value' was declared here const char value; ^~~~~ /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp: In member function 'ArduinoJson6150_1100000::DeserializationError ArduinoJson6150_1100000::JsonDeserializer<TReader, TStringStorage>::parseObject(ArduinoJson6150_1100000::CollectionData&, TFilter, ArduinoJson6150_1100000::NestingLimit) [with TFilter = ArduinoJson6150_1100000::AllowAllFilter; TReader = ArduinoJson6150_1100000::Reader<std::__cxx11::basic_string, void>; TStringStorage = ArduinoJson6150_1100000::StringCopier]': /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:241:28: error: 'key' may be used uninitialized in this function [-Werror=maybe-uninitialized] slot->setOwnedKey(make_not_null(key)); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp: In member function 'ArduinoJson6150_1100000::DeserializationError ArduinoJson6150_1100000::JsonDeserializer<TReader, TStringStorage>::parseVariant(ArduinoJson6150_1100000::VariantData&, TFilter, ArduinoJson6150_1100000::NestingLimit) [with TFilter = ArduinoJson6150_1100000::AllowAllFilter; TReader = ArduinoJson6150_1100000::Reader<const char, void>; TStringStorage = ArduinoJson6150_1100000::StringCopier]': /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:339:27: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] variant.setOwnedString(make_not_null(value)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:335:17: note: 'value' was declared here const char value; ^~~~~ /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp: In member function 'ArduinoJson6150_1100000::DeserializationError ArduinoJson6150_1100000::JsonDeserializer<TReader, TStringStorage>::parseObject(ArduinoJson6150_1100000::CollectionData&, TFilter, ArduinoJson6150_1100000::NestingLimit) [with TFilter = ArduinoJson6150_1100000::AllowAllFilter; TReader = ArduinoJson6150_1100000::Reader<const char, void>; TStringStorage = ArduinoJson6150_1100000::StringCopier]': /home/lieven/workspace/ArduinoJson/src/ArduinoJson/Json/JsonDeserializer.hpp:241:28: error: 'key' may be used uninitialized in this function [-Werror=maybe-uninitialized] slot->setOwnedKey(make_not_null(key)); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ cc1plus: some warnings being treated as errors /home/lieven/esp/esp-idf/make/component_wrapper.mk:291: recipe for target 'Config.o' failed