PVS-StudioWarnings

PVS-Studio warning V519 for QT

Nov 21st, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. void QXmlStreamReaderPrivate::init()
  2. {
  3.   tos = 0;                   <<<---
  4.   scanDtd = false;
  5.   token = -1;
  6.   token_char = 0;
  7.   isEmptyElement = false;
  8.   isWhitespace = true;
  9.   isCDATA = false;
  10.   standalone = false;
  11.   tos = 0;                   <<<---
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in QT project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V519 The 'tos' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 811, 819. bootstrap qxmlstream.cpp 819
  18.  
  19. 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