Re: [spice-server PATCH 1/3] compress_seg: comment out unused assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> CLANG warning: "Value stored to 'ref_limit' is never read"
> 
> Commenting out since there is a ToDo that refers to ref_limit
> 
> Found by Covscan.
> 
> Signed-off-by: Uri Lublin <uril@xxxxxxxxxx>
> ---
> 
> Should the comment be deleted too ?
> 

I think would be time to revise the comment and maybe the code.

The comment is (I suppose):
    while (ip < ip_bound) { // TODO: maybe separate a run from the same seg or from
                           // different ones in order to spare ref < ref_limit

but this came from commit:
commit c1b79eb035fa158fb2ac3bc8e559809611070016
Author: Yaniv Kamay <ykamay@xxxxxxxxxx>
Date:   Sat Sep 19 21:25:46 2009 +0300

    fresh start

with no further history :-(
Is the former history somewhere?

Something is suggesting me that the loop was "while (ref < ref_limit)"
instead of the current "while (ip < ip_bound)". Also wondering why
ip_bound is ref_limit (seg->lines_end) minus 2 pixels and so why RLE
check ignores last 2 pixels. But I have similar questions for ip_limit.

> ---
>  server/glz-encode.tmpl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/glz-encode.tmpl.c b/server/glz-encode.tmpl.c
> index 48bab50bc..ad48c86c8 100644
> --- a/server/glz-encode.tmpl.c
> +++ b/server/glz-encode.tmpl.c
> @@ -282,7 +282,7 @@ static void FNAME(compress_seg)(Encoder *encoder,
> uint32_t seg_idx, PIXEL *from,
>  
>                  ip += 3;
>                  ref = anchor + 2;
> -                ref_limit = (PIXEL *)(seg->lines_end);
> +                //ref_limit = (PIXEL *)(seg->lines_end);
>                  len = 3;
>  
>                  x = *ref;

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]