From 59435d2d3af8a9f64ee40eac4f0479470ba6badf Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 12 Jan 2012 17:57:37 +0100 Subject: vmwgfx,saa: Fix a bunch of compilation warnings Signed-off-by: Thomas Hellstrom Reviewed-by: Jakob Bornecrantz --- saa/saa_unaccel.c | 3 +-- vmwgfx/vmwgfx_driver.c | 4 ++-- vmwgfx/vmwgfx_drmi.c | 2 +- vmwgfx/vmwgfx_tex_video.c | 4 ---- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/saa/saa_unaccel.c b/saa/saa_unaccel.c index deaf5aa..0a6751e 100644 --- a/saa/saa_unaccel.c +++ b/saa/saa_unaccel.c @@ -629,7 +629,6 @@ saa_compute_composite_regions(ScreenPtr pScreen, RegionPtr *mask_reg) { struct saa_screen_priv *sscreen = saa_screen(pScreen); - PixmapPtr dst_pixmap; RegionPtr srcReg = NULL; RegionPtr maskReg = NULL; Bool ret; @@ -689,7 +688,7 @@ saa_compute_composite_regions(ScreenPtr pScreen, /* * Translate dst region to pixmap space. */ - dst_pixmap = saa_get_pixmap(pDst->pDrawable, &xoff, &yoff); + (void) saa_get_pixmap(pDst->pDrawable, &xoff, &yoff); REGION_TRANSLATE(pScreen, dst_reg, pDst->pDrawable->x + xoff, pDst->pDrawable->y + yoff); diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c index dcb6c83..e9e0c09 100644 --- a/vmwgfx/vmwgfx_driver.c +++ b/vmwgfx/vmwgfx_driver.c @@ -335,7 +335,6 @@ vmwgfx_set_topology(ScrnInfoPtr pScrn, const char *topology, const char *info) static Bool drv_pre_init(ScrnInfoPtr pScrn, int flags) { - xf86CrtcConfigPtr xf86_config; modesettingPtr ms; rgb defaultWeight = { 0, 0, 0 }; EntityInfoPtr pEnt; @@ -471,7 +470,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) /* Allocate an xf86CrtcConfig */ xf86CrtcConfigInit(pScrn, &crtc_config_funcs); - xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); /* get max width and height */ { @@ -732,6 +730,8 @@ drv_create_screen_resources(ScreenPtr pScreen) vmwgfx_swap(ms, pScreen, CreateScreenResources); ret = pScreen->CreateScreenResources(pScreen); vmwgfx_swap(ms, pScreen, CreateScreenResources); + if (!ret) + return ret; drv_adjust_frame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); diff --git a/vmwgfx/vmwgfx_drmi.c b/vmwgfx/vmwgfx_drmi.c index e326d31..496a16b 100644 --- a/vmwgfx/vmwgfx_drmi.c +++ b/vmwgfx/vmwgfx_drmi.c @@ -452,7 +452,7 @@ vmwgfx_unref_stream(int drm_fd, uint32_t stream_id) ret = drmCommandWrite(drm_fd, DRM_VMW_UNREF_STREAM, &s_arg, sizeof(s_arg)); - return 0; + return (ret != 0) ? -1 : 0; } int diff --git a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c index cc94c20..af53379 100644 --- a/vmwgfx/vmwgfx_tex_video.c +++ b/vmwgfx/vmwgfx_tex_video.c @@ -848,8 +848,4 @@ xorg_xv_init(ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Disabling Xv because no adaptors could be initialized.\n"); } - - - out_err_mem: - free(adaptors); } -- cgit v1.2.3