You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christophe JAILLET <ch...@wanadoo.fr> on 2013/03/30 21:42:54 UTC
Re: Clang Checkers
Hi,
here is an old response that got lost in my mail client... As we say in
France, better late than never...
>>>>>>>>
report for dead assignment in modules/proxy/mod_proxy_ftp.c is interesting.
IMO, either there is a real bug there or the code need to be cleaned up
because some part of it can never trigger.
In the huge function' proxy_send_dir_filter', there is a 'if' block
between line 678 and line 727.
In this block 2 variables, searchidx and firstfile, are declared and used.
However, being variable local to the if block, they are initialized
*every* time we reach line 681.
So :
- firstfile:
- line 681: initialized to 1
- line 704: test is always true, first block is always executed
- searchidx:
- useless because of the above.
I'm not sure of what the logic should be, but there seems be be
something broken here.
BTW, if you could re-run clang and post the result, it could be interesting.
CJ
Le 14/09/2012 20:10, Igor Galić a écrit :
> Hey folks,
>
> over at trafficserver we started looking into running
> clang's checkers over our code. Using the momentum, Daniel
> and myself rand the checkers over httpd and apr (both from
> trunk) as well.
>
> Daniel's checks are ran under FreeBSD/clang 3.0:
>
> http://inhouse.humbedooh.com/clang/2012-09-14-3/
>
> Mine are ran under Fedora and clang 3.2 (trunk):
>
> http://people.apache.org/~igalic/checks/httpd/latest/
>
>
> So long,
>
> i
>