mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Fixed "maybe-uninitialized" warning (fixes #1217)
This commit is contained in:
@@ -10,6 +10,16 @@
|
||||
#include <ArduinoJson/Strings/RamStringAdapter.hpp>
|
||||
#include <ArduinoJson/Variant/VariantContent.hpp>
|
||||
|
||||
// VariantData can't have a constructor (to be a POD), so we have no way to fix
|
||||
// this warning
|
||||
#if defined(__GNUC__)
|
||||
#if __GNUC__ >= 7
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
class VariantData {
|
||||
@@ -383,3 +393,9 @@ class VariantData {
|
||||
};
|
||||
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if __GNUC__ >= 8
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user