[PATCH libxkbcommon 11/11] Fix remaining warnings

Alan Coopersmith alan.coopersmith at oracle.com
Sat Feb 25 09:34:29 PST 2012


On 02/25/12 02:13 AM, Ran Benita wrote:
> Signed-off-by: Ran Benita<ran234 at gmail.com>
> ---
>   src/xkbcomp/geometry.c |    8 ++++----
>   src/xkbcomp/symbols.c  |    2 +-
>   src/xkbcomp/utils.h    |    2 +-
>   3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
> index 18f41e6..bb3a891 100644
> --- a/src/xkbcomp/geometry.c
> +++ b/src/xkbcomp/geometry.c
> @@ -3592,11 +3592,11 @@ CopySectionDef(struct xkb_geometry * geom, SectionInfo * si, GeometryInfo * info
>                   key->shape_ndx = 0;
>               else
>               {
> -                ShapeInfo *si;
> -                si = FindShape(info, ki->shape, "key", keyText(ki));
> -                if (!si)
> +                ShapeInfo *shapei;
> +                shapei = FindShape(info, ki->shape, "key", keyText(ki));
> +                if (!shapei)
>                       return False;
> -                key->shape_ndx = si->index;
> +                key->shape_ndx = shapei->index;
>               }
>               if (ki->color != None)
>                   color =
> diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
> index 1b98602..2a89598 100644
> --- a/src/xkbcomp/symbols.c
> +++ b/src/xkbcomp/symbols.c
> @@ -1678,7 +1678,7 @@ FindKeyForSymbol(struct xkb_desc * xkb, uint32_t sym, xkb_keycode_t *kc_rtrn)
>               if (j<  (int) XkbKeyNumSyms(xkb, i))
>               {
>                   gotOne = True;
> -                if ((XkbKeySym(xkb, i, j) == sym))
> +                if (XkbKeySym(xkb, i, j) == sym)
>                   {
>                       *kc_rtrn = i;
>                       return True;
> diff --git a/src/xkbcomp/utils.h b/src/xkbcomp/utils.h
> index 24bcd6f..c82ee9f 100644
> --- a/src/xkbcomp/utils.h
> +++ b/src/xkbcomp/utils.h
> @@ -114,7 +114,7 @@ uError(const char *s, ...);
>
>   #define FATAL			uFatalError
>
> -extern __ATTR_PRINTF(1, 2) void
> +extern __ATTR_PRINTF(1, 2) _X_NORETURN void
>   uFatalError(const char *s, ...);
>
>   /* WSGO stands for "Weird Stuff Going On" (wtf???) */

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list