summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2012-01-12 17:57:37 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2012-01-13 16:58:16 +0100
commit59435d2d3af8a9f64ee40eac4f0479470ba6badf (patch)
tree6397bd6ae7d172b45851441b89be75aa16d1eb3b
parent0628ad20f31a239f99fcbbfe42197c56a5ae8864 (diff)
vmwgfx,saa: Fix a bunch of compilation warnings
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r--saa/saa_unaccel.c3
-rw-r--r--vmwgfx/vmwgfx_driver.c4
-rw-r--r--vmwgfx/vmwgfx_drmi.c2
-rw-r--r--vmwgfx/vmwgfx_tex_video.c4
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);
}