diff options
author | Karl Schultz <karl.w.schultz@gmail.com> | 2010-02-13 17:31:58 -0700 |
---|---|---|
committer | Karl Schultz <karl.w.schultz@gmail.com> | 2010-02-13 17:34:04 -0700 |
commit | b30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch) | |
tree | 7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/swrast | |
parent | 5fd2b46a20321d8600d6256bff17ec3ebc9cb510 (diff) |
mesa: Fix compiler warnings
Add explicit casts, fix constant types, fix variable types.
Fixes about 340 warnings in MSFT Visual Studio.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_aatritemp.h | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_atifragshader.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_clear.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_texcombine.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index a8b22c548f..76d4005b8c 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -328,11 +328,11 @@ #if defined(DO_ATTRIBS) /* compute attributes at left-most fragment */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 1.5, iy + 0.5F, wPlane); + span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 1.5F, iy + 0.5F, wPlane); ATTRIB_LOOP_BEGIN GLuint c; for (c = 0; c < 4; c++) { - span.attrStart[attr][c] = solve_plane(ix + 1.5, iy + 0.5F, attrPlane[attr][c]); + span.attrStart[attr][c] = solve_plane(ix + 1.5F, iy + 0.5F, attrPlane[attr][c]); } ATTRIB_LOOP_END #endif diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index 05da64de3a..0f06cdf9f9 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -86,7 +86,7 @@ apply_swizzle(GLfloat values[4], GLuint swizzle) q = 0.000000001F; values[0] = s / q; values[1] = t / q; - values[2] = 1.0 / q; + values[2] = 1.0F / q; break; } values[3] = 0.0; @@ -138,7 +138,7 @@ apply_src_mod(GLint optype, GLuint mod, GLfloat * val) val[i] = 1 - val[i]; if (mod & GL_BIAS_BIT_ATI) - val[i] = val[i] - 0.5; + val[i] = val[i] - 0.5F; if (mod & GL_2X_BIT_ATI) val[i] = 2 * val[i]; diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c index 21167a64b3..820297f3ee 100644 --- a/src/mesa/swrast/s_clear.c +++ b/src/mesa/swrast/s_clear.c @@ -77,7 +77,7 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb, UNCLAMPED_FLOAT_TO_USHORT(clearColor[BCOMP], ctx->Color.ClearColor[2]); UNCLAMPED_FLOAT_TO_USHORT(clearColor[ACOMP], ctx->Color.ClearColor[3]); for (i = 0; i < width; i++) { - COPY_4V(span.array->rgba[i], clearColor); + COPY_4V_CAST(span.array->rgba[i], clearColor, GLchan); } } else { diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 95e2c082ba..f322663ad4 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -368,7 +368,7 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n, (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) * 4.0F * scaleRGB; - dot = CLAMP(dot, 0.0, 1.0F); + dot = CLAMP(dot, 0.0F, 1.0F); rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; } break; |