Advertisement
PVS-StudioWarnings

PVS-Studio warning V571 for Notepad++

Nov 24th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. void Gripper::doTabReordering(POINT pt)
  2. {
  3.   ...
  4.   else if (_hTab == hTabOld)
  5.   {
  6.     /* delete item on switch between tabs */
  7.     ::SendMessage(_hTab, TCM_DELETEITEM, iItemOld, 0);
  8.   }
  9.   else
  10.   {
  11.     if (_hTab == hTabOld)
  12.     {
  13.       /* delete item on switch between tabs */
  14.       ::SendMessage(_hTab, TCM_DELETEITEM, iItemOld, 0);
  15.     }
  16.   }
  17.   ...
  18. }
  19.  
  20. This suspicious code was found in Notepad++ project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V571 Recurring check. The 'if (_hTab == hTabOld)' condition was already verified in line 478.  Notepad++  gripper.cpp  485
  23.  
  24. 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
Advertisement