Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void doRemove( OldDataCleanup& cleanup ) {
- int it = 0;
- while ( true ) {
- if ( it > 20 && it % 10 == 0 )
- {
- scoped_lock ll(_workLock);
- if ( ! _active ) {
- cleanup.doRemove();
- return;
- }
- }
- sleepmillis( 1000 );
- }
- }
- 'it' doesn't change.
- This suspicious code was found in MongoDB project by PVS-Studio static code analyzer.
- Warning message is:
- V560 A part of conditional expression is always false: it > 20. d_migrate.cpp 565
- 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