Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Q3TextCustomItem* Q3TextDocument::parseTable(....)
- {
- ...
- while (end < length
- && !hasPrefix(doc, length, end, QLatin1String("</td"))
- && !hasPrefix(doc, length, end, QLatin1String("<td"))
- && !hasPrefix(doc, length, end, QLatin1String("</th"))
- && !hasPrefix(doc, length, end, QLatin1String("<th"))
- && !hasPrefix(doc, length, end, QLatin1String("<td"))
- && !hasPrefix(doc, length, end, QLatin1String("</tr"))
- && !hasPrefix(doc, length, end, QLatin1String("<tr"))
- && !hasPrefix(doc, length, end, QLatin1String("</table"))
- ) {
- ....
- }
- The "td" prefix is being searched for twice.
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions to the left and to the right of the '&&' operator. Qt3Support q3richtext.cpp 6978
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment