From f4545031f92fbc26e381a0ce8c3c3ef75dca7409 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 20 Nov 2015 11:42:31 +0200 Subject: [PATCH] Qnx: Fix GCC 5.2.1 warning in release build warning: 'stateToRemove' may be used uninitialized in this function [-Wmaybe- uninitialized] I know it doesn't make sense... Change-Id: I26239fc58ea238f835cc88501e89e682ad402e85 Reviewed-by: Tobias Hunger --- src/plugins/qnx/qnxsettingswidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qnx/qnxsettingswidget.cpp b/src/plugins/qnx/qnxsettingswidget.cpp index f37ab39cdec..d8e4f866f20 100644 --- a/src/plugins/qnx/qnxsettingswidget.cpp +++ b/src/plugins/qnx/qnxsettingswidget.cpp @@ -171,7 +171,7 @@ void QnxSettingsWidget::populateConfigsCombo() void QnxSettingsWidget::setConfigState(QnxConfiguration *config, QnxSettingsWidget::State state) { - QnxSettingsWidget::State stateToRemove; + QnxSettingsWidget::State stateToRemove = QnxSettingsWidget::Activated; switch (state) { case QnxSettingsWidget::Added : stateToRemove = QnxSettingsWidget::Removed; @@ -184,6 +184,7 @@ void QnxSettingsWidget::setConfigState(QnxConfiguration *config, break; case QnxSettingsWidget::Deactivated: stateToRemove = QnxSettingsWidget::Activated; + break; } foreach (const ConfigState &configState, m_changedConfigs) {