From 0a8972bbeab50bac6ebebbe27c889889375d046e Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sat, 24 Jun 2023 21:36:45 +0100 Subject: [PATCH] Cortex: initialize the log message GCC 13 warns that the item could be initialized. From looking at the code, it could very well be that the log message contained garbage. At least clear the data before sending it out. Change-Id: Id02bf314d0c02f852748bdac9cef010ebf073994 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6654 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp b/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp index cbe92c30b2..ae62afa75d 100644 --- a/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp +++ b/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp @@ -136,7 +136,7 @@ LogWriter::~LogWriter() { printf("LogWriter::~LogWriter() called\n"); status_t err; - log_message msg; + log_message msg = {}; Log(LOG_QUIT, msg); ::wait_for_thread(mLogThread, &err);