[PATCH libX11 3/3] Dead code removal

Peter Hutterer peter.hutterer at who-t.net
Wed May 4 15:22:11 PDT 2011


On Wed, May 04, 2011 at 11:50:49AM -0700, Jeremy Huddleston wrote:
> 
> XKBGeom.c:118:27: warning: Assigned value is always the same as the existing value
>     for (key=row->keys,pos=k=0;k<row->num_keys;k++,key++) {
>                        ~~~^~~~
> XKBGeom.c:115:5: warning: Value stored to 'pos' is never read
>     pos= 0;
>     ^    ~
> 
> Found-by: clang static analyzer
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
>  src/xkb/XKBGeom.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/src/xkb/XKBGeom.c b/src/xkb/XKBGeom.c
> index 2365f48..71a7d4a 100644
> --- a/src/xkb/XKBGeom.c
> +++ b/src/xkb/XKBGeom.c
> @@ -112,7 +112,6 @@ XkbBoundsPtr	bounds,sbounds;
>  
>      if ((!geom)||(!section)||(!row))
>  	return False;
> -    pos= 0;
>      bounds= &row->bounds;
>      bzero(bounds,sizeof(XkbBoundsRec));
>      for (key=row->keys,pos=k=0;k<row->num_keys;k++,key++) {
> -- 
> 1.7.4.1

fwiw, Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter


More information about the xorg-devel mailing list