Mesa (master): r600: silence various compiler warnings

Brian Paul brianp at kemper.freedesktop.org
Mon Apr 11 20:23:52 PDT 2011


Module: Mesa
Branch: master
Commit: 155a9670e62ef063ca9903b229ccdc3325d52bd2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=155a9670e62ef063ca9903b229ccdc3325d52bd2

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Apr 11 21:22:54 2011 -0600

r600: silence various compiler warnings

---

 src/mesa/drivers/dri/r600/evergreen_chip.c     |    4 +++-
 src/mesa/drivers/dri/r600/evergreen_oglprog.c  |    6 +++---
 src/mesa/drivers/dri/r600/evergreen_render.c   |    2 ++
 src/mesa/drivers/dri/r600/evergreen_vertprog.c |   12 ++++++------
 src/mesa/drivers/dri/r600/r700_assembler.c     |    2 ++
 src/mesa/drivers/dri/r600/r700_chip.c          |    1 +
 src/mesa/drivers/dri/r600/r700_render.c        |    2 ++
 7 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/r600/evergreen_chip.c b/src/mesa/drivers/dri/r600/evergreen_chip.c
index 53dacbf..7a29025 100644
--- a/src/mesa/drivers/dri/r600/evergreen_chip.c
+++ b/src/mesa/drivers/dri/r600/evergreen_chip.c
@@ -124,7 +124,7 @@ static void evergreenSendTexState(struct gl_context *ctx, struct radeon_state_at
     context_t *context = EVERGREEN_CONTEXT(ctx);
 	EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
 
-    struct evergreen_vertex_program *vp = context->selected_vp;
+    struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *) context->selected_vp;
 
 	struct radeon_bo *bo = NULL;
 	unsigned int i;
@@ -379,6 +379,8 @@ static void evergreenSendVTX(struct gl_context *ctx, struct radeon_state_atom *a
     struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *)(context->selected_vp);
     unsigned int i, j = 0;
     BATCH_LOCALS(&context->radeon);
+    (void) b_l_rmesa;  /* silence unused var warning */
+
 	radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
 
     if (context->radeon.tcl.aos_count == 0)
diff --git a/src/mesa/drivers/dri/r600/evergreen_oglprog.c b/src/mesa/drivers/dri/r600/evergreen_oglprog.c
index a2a361f..1fd655e 100644
--- a/src/mesa/drivers/dri/r600/evergreen_oglprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_oglprog.c
@@ -42,7 +42,7 @@
 
 static void evergreen_freeVertProgCache(struct gl_context *ctx, struct r700_vertex_program_cont *cache)
 {
-	struct evergreen_vertex_program *tmp, *vp = cache->progs;
+	struct evergreen_vertex_program *tmp, *vp = (struct evergreen_vertex_program *) cache->progs;
 
 	while (vp) {
 		tmp = vp->next;
@@ -121,7 +121,7 @@ static void evergreenDeleteProgram(struct gl_context * ctx, struct gl_program *p
     {
     case GL_VERTEX_STATE_PROGRAM_NV:
     case GL_VERTEX_PROGRAM_ARB:	    
-	    evergreen_freeVertProgCache(ctx, vpc);
+	    evergreen_freeVertProgCache(ctx, (struct r700_vertex_program_cont *) vpc);
 	    break;
     case GL_FRAGMENT_PROGRAM_NV:
     case GL_FRAGMENT_PROGRAM_ARB:
@@ -154,7 +154,7 @@ evergreenProgramStringNotify(struct gl_context * ctx, GLenum target, struct gl_p
 
 	switch (target) {
 	case GL_VERTEX_PROGRAM_ARB:
-		evergreen_freeVertProgCache(ctx, vpc);
+		evergreen_freeVertProgCache(ctx, (struct r700_vertex_program_cont *) vpc);
 		vpc->progs = NULL;
 		break;
 	case GL_FRAGMENT_PROGRAM_ARB:
diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c
index 6e51832..b5a5f07 100644
--- a/src/mesa/drivers/dri/r600/evergreen_render.c
+++ b/src/mesa/drivers/dri/r600/evergreen_render.c
@@ -620,6 +620,7 @@ static void evergreenSetupIndexBuffer(struct gl_context *ctx, const struct _mesa
     }
 }
 
+#if 0 /* unused */
 static void evergreenAlignDataToDword(struct gl_context *ctx, 
                                  const struct gl_client_array *input, 
                                  int count, 
@@ -661,6 +662,7 @@ static void evergreenAlignDataToDword(struct gl_context *ctx,
 
     attr->stride = dst_stride;
 }
+#endif
 
 static void evergreenSetupStreams(struct gl_context *ctx, const struct gl_client_array *input[], int count)
 {
diff --git a/src/mesa/drivers/dri/r600/evergreen_vertprog.c b/src/mesa/drivers/dri/r600/evergreen_vertprog.c
index b3371f2..018869b 100644
--- a/src/mesa/drivers/dri/r600/evergreen_vertprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_vertprog.c
@@ -405,7 +405,7 @@ void evergreenSelectVertexShader(struct gl_context *ctx)
 	}
 	if (match)
 	{
-		context->selected_vp = vp;
+		context->selected_vp = (struct r700_vertex_program *) vp;
 		return;
 	}
     }
@@ -418,7 +418,7 @@ void evergreenSelectVertexShader(struct gl_context *ctx)
     }
     vp->next = vpc->progs;
     vpc->progs = vp;
-    context->selected_vp = vp;
+    context->selected_vp = (struct r700_vertex_program *) vp;
     return;
 }
 
@@ -566,7 +566,7 @@ void evergreenSetVertexFormat(struct gl_context *ctx, const struct gl_client_arr
 void * evergreenGetActiveVpShaderBo(struct gl_context * ctx)
 {
     context_t *context = EVERGREEN_CONTEXT(ctx);
-    struct evergreen_vertex_program *vp = context->selected_vp;;
+    struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *) context->selected_vp;
 
     if (vp)
 	return vp->shaderbo;
@@ -577,7 +577,7 @@ void * evergreenGetActiveVpShaderBo(struct gl_context * ctx)
 void * evergreenGetActiveVpShaderConstBo(struct gl_context * ctx)
 {
     context_t *context = EVERGREEN_CONTEXT(ctx);
-    struct evergreen_vertex_program *vp = context->selected_vp;;
+    struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *) context->selected_vp;
 
     if (vp)
 	return vp->constbo0;
@@ -589,7 +589,7 @@ GLboolean evergreenSetupVertexProgram(struct gl_context * ctx)
 {
     context_t *context = EVERGREEN_CONTEXT(ctx);
     EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
-    struct evergreen_vertex_program *vp = context->selected_vp;
+    struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *) context->selected_vp;
 
     if(GL_FALSE == vp->loaded)
     {
@@ -650,7 +650,7 @@ GLboolean evergreenSetupVPconstants(struct gl_context * ctx)
 {
     context_t *context = EVERGREEN_CONTEXT(ctx);
     EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
-    struct evergreen_vertex_program *vp = context->selected_vp;
+    struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *) context->selected_vp;
 
     struct gl_program_parameter_list *paramList;
     unsigned int unNumParamData;
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 024853c..4ed3703 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -259,6 +259,7 @@ GLboolean is_reduction_opcode(PVSDWORD* dest)
     return GL_FALSE;
 }
 
+#if 0 /* unused */
 GLboolean EG_is_reduction_opcode(PVSDWORD* dest)
 {
     if (dest->dst.op3 == 0) 
@@ -270,6 +271,7 @@ GLboolean EG_is_reduction_opcode(PVSDWORD* dest)
     }
     return GL_FALSE;
 }
+#endif
 
 GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size)
 {
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 4ec2845..7980c44 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -249,6 +249,7 @@ static void r700SendVTXState(struct gl_context *ctx, struct radeon_state_atom *a
     struct r700_vertex_program *vp = context->selected_vp;
     unsigned int i, j = 0;
     BATCH_LOCALS(&context->radeon);
+    (void) b_l_rmesa; /* silence unused var warning */
 	radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
 
     if (context->radeon.tcl.aos_count == 0)
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index bb14a23..bb09980 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -580,6 +580,7 @@ static void r700ConvertAttrib(struct gl_context *ctx, int count,
     }
 }
 
+#if 0 /* unused */
 static void r700AlignDataToDword(struct gl_context *ctx, 
                                  const struct gl_client_array *input, 
                                  int count, 
@@ -621,6 +622,7 @@ static void r700AlignDataToDword(struct gl_context *ctx,
 
     attr->stride = dst_stride;
 }
+#endif
 
 static void r700SetupStreams(struct gl_context *ctx, const struct gl_client_array *input[], int count)
 {



More information about the mesa-commit mailing list