From 2d08cb93fc4422b4670d3c44f7575b3ee5278a1d Mon Sep 17 00:00:00 2001 From: Thiago Macieira <thiago.macieira@intel.com> Date: Sun, 20 May 2012 21:10:44 +0200 Subject: [PATCH] Fix non-void function that returned without a return value QTC_ASSERT(false, action) would print "false" and then take that action (the return). The other branch of the QTC_ASSERT was a constant false, so it would never be taken. However, ICC didn't seem happy with it, so I moved the return to after the checking. Change-Id: Ia50e75c91fb345e6b21cd5f91df3070544b42d22 Reviewed-by: hjk <qthjk@ovi.com> --- .../remotelinux/typespecificdeviceconfigurationlistmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp b/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp index a028c1a714e..bf740bf56ff 100644 --- a/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp +++ b/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp @@ -92,7 +92,8 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::dev if (target()->supportsDevice(device) && ++currentRow == idx) return device.staticCast<const LinuxDeviceConfiguration>(); } - QTC_ASSERT(false, return LinuxDeviceConfiguration::ConstPtr()); + QTC_CHECK(false); + return LinuxDeviceConfiguration::ConstPtr(); } LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig() const -- GitLab