From dee9406e4847f98b346f0fff72d16df46e9584a4 Mon Sep 17 00:00:00 2001 From: michal Date: Fri, 26 Oct 2007 17:21:30 +0100 Subject: Silence compiler warnings. --- src/mesa/pipe/softpipe/sp_prim_vbuf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/pipe/softpipe/sp_prim_vbuf.c b/src/mesa/pipe/softpipe/sp_prim_vbuf.c index a950e72e56..a26179e45c 100644 --- a/src/mesa/pipe/softpipe/sp_prim_vbuf.c +++ b/src/mesa/pipe/softpipe/sp_prim_vbuf.c @@ -90,7 +90,7 @@ static INLINE struct vbuf_stage *vbuf_stage( struct draw_stage *stage ) static boolean overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz ) { - unsigned long used = (char *)ptr - (char *)map; + unsigned long used = (unsigned long) ((char *) ptr - (char *) map); return (used + bytes) > bufsz; } @@ -143,7 +143,7 @@ static void vbuf_tri( struct draw_stage *stage, if (prim->v[i]->vertex_id == 0xffff) emit_vertex( vbuf, prim->v[i] ); - vbuf->element_map[vbuf->nr_elements++] = prim->v[i]->vertex_id; + vbuf->element_map[vbuf->nr_elements++] = (ushort) prim->v[i]->vertex_id; } } @@ -161,7 +161,7 @@ static void vbuf_line(struct draw_stage *stage, if (prim->v[i]->vertex_id == 0xffff) emit_vertex( vbuf, prim->v[i] ); - vbuf->element_map[vbuf->nr_elements++] = prim->v[i]->vertex_id; + vbuf->element_map[vbuf->nr_elements++] = (ushort) prim->v[i]->vertex_id; } } @@ -177,7 +177,7 @@ static void vbuf_point(struct draw_stage *stage, if (prim->v[0]->vertex_id == 0xffff) emit_vertex( vbuf, prim->v[0] ); - vbuf->element_map[vbuf->nr_elements++] = prim->v[0]->vertex_id; + vbuf->element_map[vbuf->nr_elements++] = (ushort) prim->v[0]->vertex_id; } @@ -230,7 +230,7 @@ static void vbuf_flush_elements( struct draw_stage *stage ) vbuf->element_map, vbuf->nr_elements, vbuf->vertex_map, - (vbuf->vertex_ptr - vbuf->vertex_map) / vbuf->vertex_size ); + (unsigned) (vbuf->vertex_ptr - vbuf->vertex_map) / vbuf->vertex_size ); vbuf->nr_elements = 0; -- cgit v1.2.3