xwayland: Fix compiler warning in GLAMOR Xv

XvWindowMask is defined as 0x00020000 and cannot fit in the XvAdaptor
type which is defined as an unsigned char, thus causing a compiler
warning:

  xwayland-glamor-xv.c: In function ‘xwl_glamor_xv_add_adaptors’:
  xwayland-glamor-xv.c:339:16: warning: large integer implicitly
  truncated to unsigned type [-Woverflow]

This XvWindowMask value is actually not used for XvAdaptor itself but by
the server in its xf86xv implementation, so we don't even need that mask
in our xwayland-glamor-xv implementation.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Olivier Fourdan 2016-04-01 13:38:11 +02:00 committed by Adam Jackson
parent f9b5bbaa3a
commit e8e5d83996
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ xwl_glamor_xv_add_adaptors(ScreenPtr pScreen)
pa = xnfcalloc(1, sizeof(XvAdaptorRec));
pa->pScreen = pScreen;
pa->type = (unsigned int) (XvWindowMask | XvInputMask | XvImageMask);
pa->type = (unsigned char) (XvInputMask | XvImageMask);
pa->ddStopVideo = xwl_glamor_xv_stop_video;
pa->ddPutImage = xwl_glamor_xv_put_image;
pa->ddSetPortAttribute = xwl_glamor_xv_set_port_attribute;