Advertisement
PVS-StudioWarnings

PVS-Studio warning V622 for KDE4

Nov 26th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. void ListJob::doStart()
  2. {
  3.   Q_D( ListJob );
  4.  
  5.   switch ( d->option ) {
  6.     break;                          //<==
  7.   case IncludeUnsubscribed:
  8.     d->command = "LIST";
  9.     break;
  10.   case IncludeFolderRoleFlags:
  11.     d->command = "XLIST";
  12.     break;
  13.   case NoOption:
  14.   default:
  15.     d->command = "LSUB";
  16.   }
  17.   ....
  18. }
  19.  
  20. This suspicious code was found in KDE4 project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V622 Consider inspecting the 'switch' statement. It's possible that the first 'case' operator is missing. listjob.cpp 131
  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