PVS-StudioWarnings

PVS-Studio warning V501 for QT

Nov 13th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. void QXmlSimpleReader::setFeature(
  2.   const QString& name, bool enable)
  3. {
  4.   ....
  5.   } else if (   name == QLatin1String(
  6.     "http://trolltech.com/xml/features/report-start-end-entity")
  7.              || name == QLatin1String(
  8.     "http://trolltech.com/xml/features/report-start-end-entity"))
  9.   {
  10.   ....
  11. }
  12.  
  13. This suspicious code was found in QT project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V501 There are identical sub-expressions to the left and to the right of the '||' operator. qxml.cpp 3249
  16.  
  17. 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