mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
use static_assert to check on fw structure changes over updates (fix) (#5946)
This commit is contained in:
parent
ca79f2ce39
commit
f0eb5509a0
@ -64,7 +64,11 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
|
||||
*/
|
||||
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
|
||||
|
||||
#ifdef NONOSDK3V0
|
||||
static_assert(sizeof(station_config) == 116, "struct station_config has changed, please update comparison function");
|
||||
#else
|
||||
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
|
||||
#endif
|
||||
|
||||
if(strncmp(reinterpret_cast<const char*>(lhs.ssid), reinterpret_cast<const char*>(rhs.ssid), sizeof(lhs.ssid)) != 0) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user