Annotate LOG_FATAL

This commit is contained in:
fvanroie 2021-11-03 01:34:54 +01:00
parent ec57fa0463
commit 32c6dcfbd7
2 changed files with 3 additions and 11 deletions

View File

@ -1264,9 +1264,7 @@ void dispatch_service(const char*, const char* payload, uint8_t source)
static void dispatch_add_command(const char* p_cmdstr, void (*func)(const char*, const char*, uint8_t))
{
if(nCommands >= sizeof(commands) / sizeof(haspCommand_t)) {
LOG_FATAL(TAG_MSGR, F("CMD_OVERFLOW %d"), nCommands);
while(1) {
}
LOG_FATAL(TAG_MSGR, F("CMD_OVERFLOW %d"), nCommands); // Needs to be in curly braces
} else {
commands[nCommands].p_cmdstr = p_cmdstr;
commands[nCommands].func = func;

View File

@ -433,17 +433,11 @@ void wifiSetup()
// check for the presence of the shield:
if(WiFiSpi.status() == WL_NO_SHIELD) {
LOG_FATAL(TAG_WIFI, F("WiFi shield not present"));
// don't continue:
while(true)
;
LOG_FATAL(TAG_WIFI, F("WiFi shield not present")); // Needs to be in curly braces
}
if(!WiFiSpi.checkProtocolVersion()) {
LOG_FATAL(TAG_WIFI, F("Protocol version mismatch. Please upgrade the firmware"));
// don't continue:
while(true)
;
LOG_FATAL(TAG_WIFI, F("Protocol version mismatch. Please upgrade the firmware")); // Needs to be in curly braces
}
// attempt to connect to Wifi network