PVS-StudioWarnings

PVS-Studio warning V547 for Notepad++

Nov 11th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. DWORD WINAPI Notepad_plus::threadTextPlayer(void *params)
  2. {
  3.   ...
  4.   const char *text2display = ...;
  5.   ...
  6.   if (text2display[i] == ' ' && text2display[i] == '.')
  7.   ...
  8. }
  9.  
  10. This suspicious code was found in Notepad++ project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V547 Expression is always false. Probably the '||' operator should be used here.  Notepad++  notepad_plus.cpp  4967
  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