PVS-StudioWarnings

PVS-Studio warning V523 for Wine

Nov 17th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. static LRESULT FILEDLG95_LOOKIN_DrawItem(....)
  2. {
  3. if(pDIStruct->itemID == liInfos->uSelectedItem)
  4.   {
  5.     ilItemImage = (HIMAGELIST) SHGetFileInfoW (
  6.       (LPCWSTR) tmpFolder->pidlItem, 0, &sfi, sizeof (sfi),
  7.         shgfi_flags );
  8.   }
  9.   else
  10.   {
  11.     ilItemImage = (HIMAGELIST) SHGetFileInfoW (
  12.       (LPCWSTR) tmpFolder->pidlItem, 0, &sfi, sizeof (sfi),
  13.         shgfi_flags );
  14.   }
  15. }
  16.  
  17. This suspicious code was found in Wine project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V523 The 'then' statement is equivalent to the 'else' statement. filedlg.c 3302
  20.  
  21. 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