PVS-StudioWarnings

PVS-Studio warning V529 for MultiThreadSimpleQueue

Nov 26th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. void CMTQueueProducer::Reset()
  2. {
  3.   void* pMsg = NULL;
  4.   CSimpleMessage* pDecodedMsg = NULL;
  5.   while(TheQueueBuffer::GetInstance()->Pop(pMsg));
  6.   {
  7.     pDecodedMsg = (CSimpleMessage*) pMsg;
  8.     if (pDecodedMsg)
  9.     {
  10.       try { delete pDecodedMsg; } catch (....) { NULL; }
  11.     }
  12.     pMsg = NULL;
  13.   }
  14. }
  15.  
  16. This suspicious code was found in MultiThreadSimpleQueue project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V529 Odd semicolon ';' after 'while' operator. StandardQueues mtqueueproducer.cpp 35
  19.  
  20. 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