[ccan] [PATCH 09/10] tools: avoid dead store to dest

Rusty Russell rusty at rustcorp.com.au
Wed Mar 16 15:25:09 EST 2011


On Tue,  8 Mar 2011 20:28:12 +1100, Brad Hards <bradh at frogmouth.net> wrote:
> dest is local to the loop, so there is no point in assigning to it only to continue
> ---
>  tools/ccanlint/file_analysis.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/ccanlint/file_analysis.c b/tools/ccanlint/file_analysis.c
> index e8c8ebc..de1e8cf 100644
> --- a/tools/ccanlint/file_analysis.c
> +++ b/tools/ccanlint/file_analysis.c
> @@ -134,7 +134,6 @@ static void add_files(struct manifest *m, const char *dir)
>  
>  		is_c_src = strends(f->name, ".c");
>  		if (!is_c_src && !strends(f->name, ".h")) {
> -			dest = &m->other_files;
>  			continue;
>  		}

Good point, but the real bug is that we continue, and don't add the file
to m->other_files.

I've fixed this, and applied all the rest too.

Sorry for the delay!
Rusty.


More information about the ccan mailing list