Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IdleState CalculateIdleState(unsigned int idle_threshold) {
- ...
- DWORD current_idle_time = 0;
- ...
- // Will go -ve if we have been idle for
- // a long time (2gb seconds).
- if (current_idle_time < 0)
- current_idle_time = INT_MAX;
- ...
- }
- This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'current_idle_time < 0' is always false. Unsigned type value is never < 0. browser idle_win.cc 23
- 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