diff --git a/lib/checkcondition.cpp b/lib/checkcondition.cpp index dd21fa328..e4555622b 100644 --- a/lib/checkcondition.cpp +++ b/lib/checkcondition.cpp @@ -1357,6 +1357,10 @@ void CheckCondition::checkPointerAdditionResultNotNull() if (!tok->isComparisonOp() || !tok->astOperand1() || !tok->astOperand2()) continue; + // Macros might have pointless safety checks + if (tok->isExpandedMacro()) + continue; + const Token *calcToken, *exprToken; if (tok->astOperand1()->str() == "+") { calcToken = tok->astOperand1();