[xkbcomp PATCH] Inline the oiText macro in the only place it's used

Dirk Wallenstein halsmit at t-online.de
Sun Feb 13 08:13:48 PST 2011


On Sun, Feb 13, 2011 at 01:06:51PM +0100, Julien Cristau wrote:
> Gets rid of a compiler warning:
> geometry.c: In function 'HandleOverlayDef':
> geometry.c:2578: warning: the address of 'ol' will always evaluate as 'true'
> 
> X.Org bug#34219 <https://bugs.freedesktop.org/show_bug.cgi?id=34219>
> 
> Signed-off-by: Julien Cristau <jcristau at debian.org>
> ---
>  geometry.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/geometry.c b/geometry.c
> index 6eb3fb8..6d2ca7f 100644
> --- a/geometry.c
> +++ b/geometry.c
> @@ -179,7 +179,6 @@ typedef struct _OverlayInfo
>      unsigned short nKeys;
>      OverlayKeyInfo *keys;
>  } OverlayInfo;
> -#define	oiText(d,o)	((o)?XkbAtomText((d),(o)->name,XkbMessage):"default")
>  
>  
>  #define	_GS_Default	(1<<0)
> @@ -2575,7 +2574,8 @@ HandleOverlayDef(OverlayDef * def,
>          {
>              WSGO("Couldn't allocate OverlayKeyInfo\n");
>              ACTION2("Overlay %s for section %s will be incomplete\n",
> -                    oiText(info->dpy, &ol), scText(info->dpy, si));
> +                    XkbAtomText(info->dpy, ol.name, XkbMessage),
> +                    scText(info->dpy, si));
>              return False;
>          }
>          strncpy(key->over, keyDef->over, XkbKeyNameLength);
> -- 
> 1.7.2.3
> 

Reviewed-by: Dirk Wallenstein <halsmit at t-online.de>

-- 
Greetings,
Dirk


More information about the xorg-devel mailing list