1
0
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:
david gauchard 2019-04-03 23:17:09 +02:00 committed by GitHub
parent ca79f2ce39
commit f0eb5509a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;