summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
authorKarl Schultz <karl.w.schultz@gmail.com>2010-02-13 17:31:58 -0700
committerKarl Schultz <karl.w.schultz@gmail.com>2010-02-13 17:34:04 -0700
commitb30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch)
tree7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/swrast_setup
parent5fd2b46a20321d8600d6256bff17ec3ebc9cb510 (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_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c2
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 61172f9979..23d3cb3807 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -122,7 +122,7 @@ setup_vertex_format(GLcontext *ctx)
swsetup->last_index_bitset)) {
DECLARE_RENDERINPUTS(index_bitset);
struct tnl_attr_map map[_TNL_ATTRIB_MAX];
- int i, e = 0;
+ unsigned int i, e = 0;
swsetup->intColors = intColors;
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index d9bf54dd46..b9b78e16b0 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -132,9 +132,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
saved_index[1] = v[1]->attrib[FRAG_ATTRIB_CI][0];
saved_index[2] = v[2]->attrib[FRAG_ATTRIB_CI][0];
- SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e0]);
- SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e1]);
- SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e2]);
+ SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], vbindex[e0]);
+ SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], vbindex[e1]);
+ SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], vbindex[e2]);
}
}
}
@@ -159,9 +159,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
offset += MAX2(dzdx, dzdy) * ctx->Polygon.OffsetFactor;
}
/* new Z values */
- oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max);
- oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max);
- oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max);
+ oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max);
+ oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max);
+ oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max);
}
}