Advertisement
PVS-StudioWarnings

PVS-Studio warning V612 for DDKSamples

Nov 25th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. NDIS_STATUS
  2. AmSetApBeaconMode(....)
  3. {
  4.   ....
  5.   while (BeaconEnabled != AssocMgr->BeaconEnabled)
  6.   {
  7.     ndisStatus = ....;
  8.     if (NDIS_STATUS_SUCCESS != ndisStatus)
  9.     {
  10.       break;
  11.     }
  12.     AssocMgr->BeaconEnabled = BeaconEnabled;
  13.     break;
  14.   }
  15.   ....
  16. }
  17.  
  18. This suspicious code was found in DDKSamples project by PVS-Studio static code analyzer.
  19. Warning message is:
  20. V612 An unconditional 'break' within a loop. ap_assocmgr.c 1817
  21.  
  22. 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