Mesa (master): mesa: silence uninitialized var warnings
Brian Paul
brianp at kemper.freedesktop.org
Tue Jan 20 16:28:59 UTC 2009
Module: Mesa
Branch: master
Commit: 9d216be8cfe57f88cd2d890c2334df8ff5c30436
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d216be8cfe57f88cd2d890c2334df8ff5c30436
Author: Brian Paul <brianp at vmware.com>
Date: Tue Jan 20 09:20:41 2009 -0700
mesa: silence uninitialized var warnings
---
src/mesa/swrast/s_span.c | 1 +
src/mesa/swrast/s_texfilter.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 214c2a1..7f9cc64 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1032,6 +1032,7 @@ add_specular(GLcontext *ctx, SWspan *span)
ASSERT(!ctx->FragmentProgram._Current);
ASSERT(span->arrayMask & SPAN_RGBA);
ASSERT(swrast->_ActiveAttribMask & FRAG_BIT_COL1);
+ (void) swrast; /* silence warning */
if (span->array->ChanType == GL_FLOAT) {
if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) {
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 6b1dfd5..a095b25 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -2064,6 +2064,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max,
default:
_mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear");
i0 = i1 = 0;
+ fcol = 0.0F;
}
*i0out = i0;
*i1out = i1;
@@ -2872,6 +2873,8 @@ sample_depth_texture( GLcontext *ctx,
texcoords[i][1]);
slice = clamp_rect_coord_nearest(tObj->WrapR, texcoords[i][2], depth);
break;
+ default:
+ col = row = slice = 0;
}
if (col >= 0 && row >= 0 && col < width && row < height &&
@@ -2982,6 +2985,8 @@ sample_depth_texture( GLcontext *ctx,
texcoords[i][1], &j0, &j1, &b);
slice = clamp_rect_coord_nearest(tObj->WrapR, texcoords[i][2], depth);
break;
+ default:
+ slice = 0;
}
useBorderTexel = 0;
More information about the mesa-commit
mailing list