PVS-StudioWarnings

PVS-Studio warning V521 for VirtualBox

Nov 18th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. void Appliance::i_importMachines(....)
  2. {
  3.   ....
  4.   /* Iterate through all virtual systems of that appliance */
  5.   size_t i = 0;
  6.   for (it = reader.m_llVirtualSystems.begin(),
  7.        it1 = m->virtualSystemDescriptions.begin();
  8.        it != reader.m_llVirtualSystems.end(),         //<==
  9.        it1 != m->virtualSystemDescriptions.end();
  10.        ++it, ++it1, ++i)
  11.   {....}
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in VirtualBox project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V521 Such expressions using the ',' operator are dangerous. Make sure the expression is correct. applianceimplimport.cpp 3943
  18.  
  19. 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