[Spice-devel] [PATCH xf86-video-qxl] fix a bunch of warnings - unused variables, lables, code

Alon Levy alevy at redhat.com
Sun Sep 8 04:54:21 PDT 2013


Signed-off-by: Alon Levy <alevy at redhat.com>
---
 src/qxl_kms.c     | 27 ---------------------------
 src/qxl_surface.c |  7 +------
 2 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/src/qxl_kms.c b/src/qxl_kms.c
index b091a12..32859cc 100644
--- a/src/qxl_kms.c
+++ b/src/qxl_kms.c
@@ -83,7 +83,6 @@ static Bool qxl_open_drm_master(ScrnInfoPtr pScrn)
 	return FALSE;
     }
 
- out:
     qxl->drmmode.fd = qxl->drm_fd;
     return TRUE;
 }
@@ -181,7 +180,6 @@ qxl_create_screen_resources_kms(ScreenPtr pScreen)
     Bool           ret;
     PixmapPtr      pPixmap;
     qxl_surface_t *surf;
-    int            i;
     
     pScreen->CreateScreenResources = qxl->create_screen_resources;
     ret = pScreen->CreateScreenResources (pScreen);
@@ -257,7 +255,6 @@ Bool qxl_screen_init_kms(SCREEN_INIT_ARGS_DECL)
     ScrnInfoPtr    pScrn = xf86ScreenToScrn (pScreen);
     qxl_screen_t * qxl = pScrn->driverPrivate;
     VisualPtr      visual;
-    uint64_t n_surf;
 
     miClearVisualTypes ();
     if (!miSetVisualTypes (pScrn->depth, miGetDefaultVisualMask (pScrn->depth),
@@ -369,7 +366,6 @@ static struct qxl_bo *qxl_bo_alloc(qxl_screen_t *qxl,
         return NULL; // an invalid handle
     }
 
- out:
     bo->name = name;
     bo->size = size;
     bo->type = QXL_BO_DATA;
@@ -383,8 +379,6 @@ static struct qxl_bo *qxl_cmd_alloc(qxl_screen_t *qxl,
 				    unsigned long size, const char *name)
 {
     struct qxl_kms_bo *bo;
-    struct drm_qxl_alloc alloc;
-    int ret;
 
     bo = calloc(1, sizeof(struct qxl_kms_bo));
     if (!bo)
@@ -500,27 +494,6 @@ static void qxl_bo_output_bo_reloc(qxl_screen_t *qxl, uint32_t dst_offset,
     qxl->cmds.n_relocs++;
 }
 
-static void qxl_bo_output_cmd_reloc(qxl_screen_t *qxl, QXLCommand *command,
-				    struct qxl_bo *_src_bo)
-{
-    struct qxl_kms_bo *src_bo = (struct qxl_kms_bo *)_src_bo;
-    struct drm_qxl_reloc *r = &qxl->cmds.relocs[qxl->cmds.n_relocs];
-
-    if (qxl->cmds.n_reloc_bos >= MAX_RELOCS || qxl->cmds.n_relocs >= MAX_RELOCS)
-      assert(0);
-
-    qxl->cmds.reloc_bo[qxl->cmds.n_reloc_bos] = _src_bo;
-    qxl->cmds.n_reloc_bos++;
-    src_bo->refcnt++;
-    /* fix the kernel names */
-    r->reloc_type = QXL_RELOC_TYPE_BO;
-    r->dst_handle = 0;
-    r->src_handle = src_bo->handle;
-    r->dst_offset = 0;
-    r->src_offset = 0;
-    qxl->cmds.n_relocs++;
-}
-
 static void qxl_bo_write_command(qxl_screen_t *qxl, uint32_t cmd_type, struct qxl_bo *_bo)
 {
     struct qxl_kms_bo *bo = (struct qxl_kms_bo *)_bo;
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 5e6737a..685d09f 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -471,10 +471,8 @@ image_from_surface_internal(qxl_screen_t *qxl,
     return image_bo;
 }
 
-struct qxl_bo *image_from_surface(qxl_screen_t *qxl, qxl_surface_t *dest)
+static struct qxl_bo *image_from_surface(qxl_screen_t *qxl, qxl_surface_t *dest)
 {
-    struct QXLImage *image_bo;
-
     if (!dest->image_bo)
       dest->image_bo = image_from_surface_internal(qxl, dest);
 
@@ -520,7 +518,6 @@ qxl_surface_copy (qxl_surface_t *dest,
     else
     {
 	struct qxl_bo *image_bo;
-	struct QXLImage *image;
 
 	dest->u.copy_src->ref_count++;
 
@@ -590,8 +587,6 @@ image_from_picture (qxl_screen_t *qxl,
 		    qxl_surface_t *surface,
 		    int *force_opaque)
 {
-    struct qxl_bo *image_bo;
-
     if (picture->format == PICT_x8r8g8b8)
 	*force_opaque = TRUE;
     else
-- 
1.8.3.1



More information about the Spice-devel mailing list