diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> | 2022-02-17 18:16:32 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-18 12:45:00 +0000 |
commit | 2334725f0a92d8a8bfedcf986fb48d202cdc1ae4 (patch) | |
tree | 1f6678a3b72354b0da7055d8b1aee71fbfbdcfcc | |
parent | bcc9f901e84bf4cb63e68fdf5164673d686f4c77 (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;
Change-Id: Ic0d41a024056528cac51a88086ac7e492c94bb4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f1d521f0765c6bb928f3fe39f952366f956fa241)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/corelib/global/qlogging.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 15175f19e9..5d9c5c99ed 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: |