PVS-StudioWarnings

PVS-Studio warning V528 for Notepad++

Nov 27th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. TCHAR headerM[headerSize] = TEXT("");
  2. ...
  3. size_t Printer::doPrint(bool justDoIt)
  4. {
  5.   ...
  6.   if (headerM != '\0')
  7.   ...
  8. }
  9.  
  10. This suspicious code was found in Notepad++ project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V528 It is odd that pointer to 'char' type is compared with the '\0' value. Probably meant: *headerM != '\0'.  notepadPlus printer.cpp 378
  13.  
  14. 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