PVS-StudioWarnings

PVS-Studio warning V523 for MultiThreadSimpleQueue

Nov 20th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. BOOL CGridCellBase::PrintCell(....)
  2. {
  3.   ...
  4.   if(IsFixed())
  5.     crFG = (GetBackClr() != CLR_DEFAULT) ?
  6.       GetTextClr() : pDefaultCell->GetTextClr();
  7.   else
  8.     crFG = (GetBackClr() != CLR_DEFAULT) ?
  9.       GetTextClr() : pDefaultCell->GetTextClr();
  10.   ...
  11. }
  12.  
  13. This suspicious code was found in MultiThreadSimpleQueue project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V523 The 'then' statement is equivalent to the 'else' statement. GridCtrl gridcellbase.cpp 652
  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