[Mesa-dev] [PATCH 05/20] intel: Silence "warning: unused parameter ‘intel’"

Ian Romanick idr at freedesktop.org
Mon Aug 29 14:58:55 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

The intel_context was not used in any of these functions, so remove it.
---
 src/mesa/drivers/dri/intel/intel_buffer_objects.c |   10 ++++------
 src/mesa/drivers/dri/intel/intel_buffer_objects.h |    3 +--
 src/mesa/drivers/dri/intel/intel_tex_validate.c   |    5 ++---
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 0acc3a1..df52656 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -82,8 +82,7 @@ intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
 /* Break the COW tie to the region.  The region gets to keep the data.
  */
 void
-intel_bufferobj_release_region(struct intel_context *intel,
-                               struct intel_buffer_object *intel_obj)
+intel_bufferobj_release_region(struct intel_buffer_object *intel_obj)
 {
    assert(intel_obj->region->buffer == intel_obj->buffer);
    intel_obj->region->pbo = NULL;
@@ -111,7 +110,6 @@ intel_bufferobj_cow(struct intel_context *intel,
 static void
 intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
 {
-   struct intel_context *intel = intel_context(ctx);
    struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
 
    assert(intel_obj);
@@ -125,7 +123,7 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
 
    free(intel_obj->sys_buffer);
    if (intel_obj->region) {
-      intel_bufferobj_release_region(intel, intel_obj);
+      intel_bufferobj_release_region(intel_obj);
    }
 
    drm_intel_bo_unreference(intel_obj->buffer);
@@ -163,7 +161,7 @@ intel_bufferobj_data(struct gl_context * ctx,
    assert(!obj->Pointer); /* Mesa should have unmapped it */
 
    if (intel_obj->region)
-      intel_bufferobj_release_region(intel, intel_obj);
+      intel_bufferobj_release_region(intel_obj);
 
    if (intel_obj->buffer != NULL)
       release_buffer(intel_obj);
@@ -516,7 +514,7 @@ intel_bufferobj_buffer(struct intel_context *intel,
       if (flag == INTEL_WRITE_PART)
          intel_bufferobj_cow(intel, intel_obj);
       else if (flag == INTEL_WRITE_FULL) {
-         intel_bufferobj_release_region(intel, intel_obj);
+         intel_bufferobj_release_region(intel_obj);
 	 intel_bufferobj_alloc_buffer(intel, intel_obj);
       }
    }
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.h b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
index 81ee21f..d75cdbf 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.h
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
@@ -106,8 +106,7 @@ intel_buffer_object(struct gl_buffer_object *obj)
  */
 void intel_bufferobj_cow(struct intel_context *intel,
                          struct intel_buffer_object *intel_obj);
-void intel_bufferobj_release_region(struct intel_context *intel,
-                                    struct intel_buffer_object *intel_obj);
+void intel_bufferobj_release_region(struct intel_buffer_object *intel_obj);
 
 
 #endif
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index 31ac689..f47f12a 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -14,8 +14,7 @@
  * but BaseLevel.
  */
 static void
-intel_update_max_level(struct intel_context *intel,
-		       struct intel_texture_object *intelObj,
+intel_update_max_level(struct intel_texture_object *intelObj,
 		       struct gl_sampler_object *sampler)
 {
    struct gl_texture_object *tObj = &intelObj->base;
@@ -87,7 +86,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
 
    /* What levels must the tree include at a minimum?
     */
-   intel_update_max_level(intel, intelObj, sampler);
+   intel_update_max_level(intelObj, sampler);
    firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);
 
    /* Fallback case:
-- 
1.7.4.4



More information about the mesa-dev mailing list