summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-02-17 18:16:32 +0200
committerPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-02-18 12:44:40 +0000
commitf1d521f0765c6bb928f3fe39f952366f956fa241 (patch)
tree2f38d68944521aea5b7af222f5d042dbe0f1dcd6 /src/corelib/global/qlogging.cpp
parente391022d9cd0d944efdefeee8f6626fb0e8824e8 (diff)
QNX: Silence compiler warning by initializing variable
qtbase/src/corelib/global/qlogging.cpp: In function 'void qDefaultMessageHandler(QtMsgType, const QMessageLogContext&, const QString&)': qtbase/src/corelib/global/qlogging.cpp:1555:11: warning: 'severity' may be used uninitialized in this function [-Wmaybe-uninitialized] slog2c(NULL, QT_LOG_CODE, severity, formattedMessage.toLocal8Bit().constData()); qtbase/src/corelib/global/qlogging.cpp:1535:9: note: 'severity' was declared here int severity; Pick-to: 6.2 6.3 5.15 Change-Id: Ic0d41a024056528cac51a88086ac7e492c94bb4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 7c37d5b4329..a50eccfa7f7 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1532,7 +1532,7 @@ static bool slog2_default_handler(QtMsgType type, const QMessageLogContext &cont
// Set as the default buffer
slog2_set_default_buffer(buffer_handle);
}
- int severity;
+ int severity = SLOG2_INFO;
//Determines the severity level
switch (type) {
case QtDebugMsg: