From e8e5d839968e22cf42a6e1982a07b02c6f4a4562 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 1 Apr 2016 13:38:11 +0200 Subject: [PATCH] xwayland: Fix compiler warning in GLAMOR Xv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Olivier Fourdan --- hw/xwayland/xwayland-glamor-xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-glamor-xv.c b/hw/xwayland/xwayland-glamor-xv.c index c99418d43..65f93c693 100644 --- a/hw/xwayland/xwayland-glamor-xv.c +++ b/hw/xwayland/xwayland-glamor-xv.c @@ -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;