mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
use static_assert to check on fw structure changes over updates (#5939)
This commit is contained in:
@ -63,6 +63,9 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
|
||||
* @return equal
|
||||
*/
|
||||
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
|
||||
|
||||
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
|
||||
|
||||
if(strncmp(reinterpret_cast<const char*>(lhs.ssid), reinterpret_cast<const char*>(rhs.ssid), sizeof(lhs.ssid)) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user