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:
parent
0264604571
commit
69abcf2638
@ -130,7 +130,7 @@ private:
|
|||||||
void init();
|
void init();
|
||||||
#ifdef CONFIG_THREADED_INPUTS
|
#ifdef CONFIG_THREADED_INPUTS
|
||||||
static void readThread(void* data);
|
static void readThread(void* data);
|
||||||
MainLoop* m_threadLoop;
|
MainLoop* m_threadLoop = nullptr;
|
||||||
static uint8_t m_threadBuf[sizeof(InputEvent) * 32];
|
static uint8_t m_threadBuf[sizeof(InputEvent) * 32];
|
||||||
QueueHandle_t m_queue;
|
QueueHandle_t m_queue;
|
||||||
StaticQueue_t m_threadQueue;
|
StaticQueue_t m_threadQueue;
|
||||||
|
@ -181,7 +181,7 @@ Platform::getLocalTime(struct tm* timedata)
|
|||||||
return false;
|
return false;
|
||||||
#elif defined(BOARD_ESP32)
|
#elif defined(BOARD_ESP32)
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
memset(&rawtime, 0, sizeof(rawtime));
|
memset(&rawtime, sizeof(rawtime), 0);
|
||||||
time(&rawtime);
|
time(&rawtime);
|
||||||
(*timedata) = (*localtime(&rawtime));
|
(*timedata) = (*localtime(&rawtime));
|
||||||
return (timedata->tm_year > (2016-1990));
|
return (timedata->tm_year > (2016-1990));
|
||||||
|
@ -89,7 +89,7 @@ void setup() {
|
|||||||
|
|
||||||
if (Platform::bootopts.crashCount > 0) {
|
if (Platform::bootopts.crashCount > 0) {
|
||||||
Log.warning(u8"Previous crash detected!!!! We're on attempt %d", Platform::bootopts.crashCount);
|
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));
|
strncpy(lastTaskBuf, MainLoop::lastTaskName(), sizeof(lastTaskBuf));
|
||||||
lastTaskBuf[15] = 0;
|
lastTaskBuf[15] = 0;
|
||||||
Log.error(u8"Crash occurred in task %s", lastTaskBuf);
|
Log.error(u8"Crash occurred in task %s", lastTaskBuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user