From 176826a1f5dd26b47f8a166a4cea9edf806cd604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 14 Jul 2020 11:15:26 +0200 Subject: [PATCH] Bug hunting; Avoid false positives --- lib/bughuntingchecks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bughuntingchecks.cpp b/lib/bughuntingchecks.cpp index 85c598062..46879ec04 100644 --- a/lib/bughuntingchecks.cpp +++ b/lib/bughuntingchecks.cpp @@ -227,7 +227,7 @@ static void uninit(const Token *tok, const ExprEngine::Value &value, ExprEngine: return; // Object allocated on the stack - if (tok->valueType() && tok->valueType()->pointer == 0 && Token::Match(tok, "%var% .")) + if (Token::Match(tok, "%var% .") && tok->next()->originalName() != "->") return; // Containers are not uninitialized