From 9dee300b6731248cff37ef384d1905338875fa67 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 20 Jan 2015 18:12:13 +0100 Subject: Debugger: Fix scoping bug in watch handler. Found by clang static analyzer. Change-Id: Ib25232b26c314d4da4707f7903f1b75b907b241d Reviewed-by: hjk --- src/plugins/debugger/watchhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index a45a9dee197..d89f2ef9bc1 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -2042,7 +2042,7 @@ int WatchHandler::format(const QByteArray &iname) const { int result = AutomaticFormat; if (const WatchData *item = m_model->findItem(iname)) { - int result = theIndividualFormats.value(item->iname, AutomaticFormat); + result = theIndividualFormats.value(item->iname, AutomaticFormat); if (result == AutomaticFormat) result = theTypeFormats.value(stripForFormat(item->type), AutomaticFormat); } -- cgit v1.2.3