src: fix some static analysis warnings
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@ -181,7 +181,7 @@ Platform::getLocalTime(struct tm* timedata)
|
||||
return false;
|
||||
#elif defined(BOARD_ESP32)
|
||||
time_t rawtime;
|
||||
memset(&rawtime, 0, sizeof(rawtime));
|
||||
memset(&rawtime, sizeof(rawtime), 0);
|
||||
time(&rawtime);
|
||||
(*timedata) = (*localtime(&rawtime));
|
||||
return (timedata->tm_year > (2016-1990));
|
||||
|
@ -89,7 +89,7 @@ void setup() {
|
||||
|
||||
if (Platform::bootopts.crashCount > 0) {
|
||||
Log.warning(u8"Previous crash detected!!!! We're on attempt %d", Platform::bootopts.crashCount);
|
||||
char lastTaskBuf[15];
|
||||
char lastTaskBuf[16];
|
||||
strncpy(lastTaskBuf, MainLoop::lastTaskName(), sizeof(lastTaskBuf));
|
||||
lastTaskBuf[15] = 0;
|
||||
Log.error(u8"Crash occurred in task %s", lastTaskBuf);
|
||||
|
Reference in New Issue
Block a user