Advertisement
PVS-StudioWarnings

PVS-Studio warning V547 for TortoiseSVN

Nov 21st, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. int main(int argc, char **argv)
  2. {
  3.   ....
  4.   DWORD ticks;
  5.   ....
  6.   if (run_timers(now, &next)) {
  7.     ticks = next - GETTICKCOUNT();
  8.     if (ticks < 0) ticks = 0;
  9.   } else {
  10.     ticks = INFINITE;
  11.   }
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in TortoiseSVN project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V547 Expression 'ticks < 0' is always false. Unsigned type value is never < 0. winplink.c 635
  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
Advertisement