PVS-StudioWarnings

PVS-Studio warning V654 for Apache

Nov 21st, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. static int proxy_wstunnel_handler(....)
  2. {
  3.   int retry;
  4.   ....
  5.   retry = 0;
  6.   while (retry < 2) {
  7.     char *locurl = url;
  8.     ....
  9.     // Variable 'retry' is not used
  10.     ....
  11.   }
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in Apache project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V654 The condition 'retry < 2' of loop is always true. mod_proxy_wstunnel mod_proxy_wstunnel.c 436
  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