On Friday, 2017-11-03 21:38:51 +0100, Giuseppe Bilotta wrote:
> This fixes some “Conditional jump depends on uninitialized value(s)”
> errors spotted by valgrind.
> 
> Signed-off-by: Giuseppe Bilotta <[email protected]>

Reviewed-by: Eric Engestrom <[email protected]>

Although the rest of the array is 0-initialised, so this only works
because NoSymbol is also 0.

> ---
>  xkb/xkbUtils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
> index 25b5a364e..8975ade8d 100644
> --- a/xkb/xkbUtils.c
> +++ b/xkb/xkbUtils.c
> @@ -222,7 +222,7 @@ XkbUpdateKeyTypesFromCore(DeviceIntPtr pXDev,
>      XkbDescPtr xkb;
>      unsigned key, nG, explicit;
>      int types[XkbNumKbdGroups];
> -    KeySym tsyms[XkbMaxSymsPerKey], *syms;
> +    KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol}, *syms;
>      XkbMapChangesPtr mc;
>  
>      xkb = pXDev->key->xkbInfo->desc;
> -- 
> 2.14.1.439.g647b9b4702
> 
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to