From 271e5cd206054d0c70a9998cf3d165cdc8971708 Mon Sep 17 00:00:00 2001 From: Nick Hynes Date: Thu, 25 Apr 2019 02:02:21 -0700 Subject: [PATCH] Fix Werror=reorder for idf.py build (#2707) --- libraries/EEPROM/src/EEPROM.cpp | 12 ++++++------ tools/platformio-build.py | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libraries/EEPROM/src/EEPROM.cpp b/libraries/EEPROM/src/EEPROM.cpp index 9fe714601e9..ac7dd72fd1f 100644 --- a/libraries/EEPROM/src/EEPROM.cpp +++ b/libraries/EEPROM/src/EEPROM.cpp @@ -28,10 +28,10 @@ #include EEPROMClass::EEPROMClass(void) - : _data(0) + : _handle(NULL) + , _data(0) , _size(0) , _dirty(false) - , _handle(NULL) , _name("eeprom") , _user_defined_size(0) { @@ -39,20 +39,20 @@ EEPROMClass::EEPROMClass(void) EEPROMClass::EEPROMClass(uint32_t sector) // Only for compatiility, no sectors in nvs! - : _data(0) + : _handle(NULL) + , _data(0) , _size(0) , _dirty(false) - , _handle(NULL) , _name("eeprom") , _user_defined_size(0) { } EEPROMClass::EEPROMClass(const char* name, uint32_t user_defined_size) - : _data(0) + : _handle(NULL) + , _data(0) , _size(0) , _dirty(false) - , _handle(NULL) , _name(name) , _user_defined_size(user_defined_size) { diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 6f8ea51519a..8f44cef9a51 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -59,7 +59,8 @@ "-Wno-unused-parameter", "-Wno-sign-compare", "-fstack-protector", - "-fexceptions" + "-fexceptions", + "-Werror=reorder" ], CXXFLAGS=[