PVS-StudioWarnings

PVS-Studio warning V696 for Cocos2d-x

Nov 20th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. bool ComAudio::serialize(void* r)
  2. {
  3.   bool ret = false;
  4.   do
  5.   {
  6.     ....
  7.     if (file != nullptr)
  8.     {
  9.       if (strcmp(file, "") == 0)
  10.       {
  11.          continue;
  12.       }
  13.       ....
  14.     }
  15.   }while(0);
  16.   return ret;
  17. }
  18.  
  19. This suspicious code was found in Cocos2d-x project by PVS-Studio static code analyzer.
  20. Warning message is:
  21. V696 The 'continue' operator will terminate 'do { ... } while (FALSE)' loop because the condition is always false. Check lines: 125, 153. cccomaudio.cpp 125
  22.  
  23. 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