Skip to content

Commit 7865898

Browse files
committed
fix #14058
1 parent a200811 commit 7865898

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/checkstring.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ void CheckString::checkIncorrectStringCompare()
318318
}
319319
}
320320
} else if (Token::Match(tok, "%str%|%char%") &&
321+
!Token::Match(tok->next(), "%name%") &&
321322
isUsedAsBool(tok, *mSettings) &&
322323
!isMacroUsage(tok))
323324
incorrectStringBooleanError(tok, tok->str());

0 commit comments

Comments
 (0)