Mesa (master): tnl: fix double->float and int/uint conversion warnings

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 28 00:08:27 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jan 27 17:01:10 2010 -0700

tnl: fix double->float and int/uint conversion warnings

Reported by Karl Schultz.

---

 src/mesa/tnl/t_draw.c      |    2 +-
 src/mesa/tnl/t_vb_points.c |    2 +-
 src/mesa/tnl/t_vertex.c    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index d8c6110..adc5048 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -399,7 +399,7 @@ void _tnl_draw_prims( GLcontext *ctx,
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    const GLuint TEST_SPLIT = 0;
    const GLint max = TEST_SPLIT ? 8 : tnl->vb.Size - MAX_CLIPPED_VERTICES;
-   GLuint max_basevertex = prim->basevertex;
+   GLint max_basevertex = prim->basevertex;
    GLuint i;
 
    if (!_mesa_check_conditional_render(ctx))
diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c
index a52505b..ab8ea60 100644
--- a/src/mesa/tnl/t_vb_points.c
+++ b/src/mesa/tnl/t_vb_points.c
@@ -64,7 +64,7 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
       for (i = 0; i < VB->Count; i++) {
          const GLfloat dist = FABSF(*eyeCoord);
          const GLfloat q = p0 + dist * (p1 + dist * p2);
-         const GLfloat atten = (q != 0.0) ? SQRTF(1.0 / q) : 1.0;
+         const GLfloat atten = (q != 0.0F) ? SQRTF(1.0F / q) : 1.0F;
          size[i][0] = pointSize * atten; /* clamping done in rasterization */
          eyeCoord += eyeCoordStride;
       }
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c
index fe4209a..d395587 100644
--- a/src/mesa/tnl/t_vertex.c
+++ b/src/mesa/tnl/t_vertex.c
@@ -383,7 +383,7 @@ static void adjust_input_ptrs( GLcontext *ctx, GLint diff)
    struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
    struct tnl_clipspace_attr *a = vtx->attr;
    const GLuint count = vtx->attr_count;
-   int j;
+   GLuint j;
 
    diff -= 1;
    for (j=0; j<count; ++j) {




More information about the mesa-commit mailing list