Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void G4QMDCollision::CalKinematicsOfBinaryCollisions(
- G4double dt )
- {
- ....
- G4int id = 0;
- ....
- if ( secs )
- {
- ....
- id++;
- ....
- }
- if ( std::abs ( eini - efin ) < fepse*10 )
- ....
- else
- {
- ....
- for ( G4int i0i = 0 ; i0i < id-1 ; i0i++ )
- {
- theSystem->DeleteParticipant( i0i+n0 );
- }
- ....
- }
- ....
- }
- This suspicious code was found in Geant4 project by PVS-Studio static code analyzer.
- Warning message is:
- V621 Consider inspecting the 'for' operator. It's possible that the loop will be executed incorrectly or won't be executed at all. _G4processes-archive g4qmdcollision.cc 228
- 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