Skip to content

Commit a5d70b1

Browse files
Update checkother.cpp
1 parent 85ee700 commit a5d70b1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎lib/checkother.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,9 @@ void CheckOtherImpl::checkConstPointer()
20892089
}
20902090
} else {
20912091
int argn = -1;
2092-
if (Token::Match(parent, "%oror%|%comp%|&&|?|!|-|<<|;"))
2092+
if (Token::Match(parent, "%oror%|%comp%|&&|?|-|!|<<|;"))
2093+
continue;
2094+
if (Token::simpleMatch(parent, "-") && parent->valueType() && parent->valueType()->pointer == 0)
20932095
continue;
20942096
if (hasIncDecPlus && (!parent->astParent() || parent->astParent()->str() == ";"))
20952097
continue;

0 commit comments

Comments
 (0)