From 29efa905ec1e22d66b517378c6e5ad47a09d6977 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 16 Jul 2015 12:26:05 +1200 Subject: [PATCH] modesetting: Use correct types for return values of glamor BO exports. glamor_name_from_pixmap and glamor_fd_from_pixmap return CARD16 and CARD32 values via pointers. The current code uses uint16_t and uint32_t which will probably be the same but it's safer to use the datatypes as specified by the function. Signed-off-by: Robert Ancell Signed-off-by: Eric Anholt --- hw/xfree86/drivers/modesetting/dri2.c | 4 ++-- hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 63cb0659d..0fe420cbc 100644 --- a/hw/xfree86/drivers/modesetting/dri2.c +++ b/hw/xfree86/drivers/modesetting/dri2.c @@ -138,8 +138,8 @@ ms_dri2_create_buffer(DrawablePtr drawable, unsigned int attachment, ScrnInfoPtr scrn = xf86ScreenToScrn(screen); DRI2Buffer2Ptr buffer; PixmapPtr pixmap; - uint32_t size; - uint16_t pitch; + CARD32 size; + CARD16 pitch; ms_dri2_buffer_private_ptr private; buffer = calloc(1, sizeof *buffer); diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index ef5b0872f..6a13660dd 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -148,8 +148,8 @@ drmmode_bo_for_pixmap(drmmode_ptr drmmode, drmmode_bo *bo, PixmapPtr pixmap) { #ifdef GLAMOR ScreenPtr screen = xf86ScrnToScreen(drmmode->scrn); - uint16_t pitch; - uint32_t size; + CARD16 pitch; + CARD32 size; int fd; #ifdef GLAMOR_HAS_GBM