From a39e5835d4f8c34d981ec1aff6e19df1d2d39a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 29 Sep 2020 18:27:07 +0200 Subject: [PATCH] Fixed #9925 (False positive: Redundant pointer operation in macro) --- lib/checkother.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index d91e14d1d..c5bdd6ce7 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2676,6 +2676,9 @@ void CheckOther::checkRedundantPointerOp() if (!tok->isUnaryOp("&") || !tok->astOperand1()->isUnaryOp("*")) continue; + if (tok->isExpandedMacro()) + continue; + // variable const Token *varTok = tok->astOperand1()->astOperand1(); if (!varTok || varTok->isExpandedMacro())