PVS-StudioWarnings

PVS-Studio warning V705 for KDE4

Nov 18th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. void EntryDetails::entryChanged(const KNS3::EntryInternal& entry)
  2. {
  3.   ....
  4.   if(m_entry.previewUrl(EntryInternal::PreviewSmall1).isEmpty()){
  5.     ui->previewBig->setVisible(false);
  6.   } else                                //<==
  7.  
  8.   if (!m_entry.previewUrl((....)type).isEmpty()) {
  9.     ....
  10.   }
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in KDE4 project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V705 It is possible that 'else' block was forgotten or commented out, thus altering the program's operation logics. entrydetailsdialog.cpp 149
  17.  
  18. 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