File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1156,16 +1156,16 @@ static bool isIfConstexpr(const Token* tok) {
11561156 return Token::simpleMatch (top->astOperand1 (), " if" ) && top->astOperand1 ()->isConstexpr ();
11571157}
11581158
1159- static const Token* isPointerArithmeticAdd (const Token* tok)
1159+ static bool isPointerArithmeticAdd (const Token* tok)
11601160{
11611161 if (!tok || tok->str () != " +" || !astIsPointer (tok))
1162- return nullptr ;
1162+ return false ;
11631163
11641164 const Token* intOp = astIsPointer (tok->astOperand1 ()) ? tok->astOperand2 () : tok->astOperand1 ();
11651165 if (intOp && intOp->hasKnownIntValue () && intOp->getKnownIntValue () != 0 )
1166- return tok ;
1166+ return true ;
11671167
1168- return nullptr ;
1168+ return false ;
11691169}
11701170
11711171static const Token* getPointerAdditionCalcToken (const Token * const tok)
@@ -1847,7 +1847,7 @@ void CheckConditionImpl::checkPointerAdditionResultNotNull()
18471847 if (tok->isExpandedMacro ())
18481848 continue ;
18491849
1850- const bool usedAsBool = astIsPointer (tok) && isUsedAsBool (tok, * mSettings );
1850+ const bool usedAsBool = astIsPointer (tok) && isUsedAsBool (tok, mSettings );
18511851 if (!tok->isComparisonOp () && !usedAsBool)
18521852 continue ;
18531853
You can’t perform that action at this time.
0 commit comments