mesa: fix int/uint comparison warnings
authorBrian Paul <brianp@vmware.com>
Thu, 28 Jan 2010 00:03:48 +0000 (17:03 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 28 Jan 2010 00:04:30 +0000 (17:04 -0700)
Reported by Karl Schultz.

src/mesa/vbo/vbo_exec_array.c
src/mesa/vbo/vbo_split.c

index bd2fccd..d6452cb 100644 (file)
@@ -49,7 +49,7 @@ vbo_get_minmax_index(GLcontext *ctx,
                     GLuint *min_index, GLuint *max_index)
 {
    GLuint i;
-   GLsizei count = prim->count;
+   GLuint count = prim->count;
    const void *indices;
 
    if (_mesa_is_bufferobj(ib->obj)) {
@@ -132,7 +132,7 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array,
       case GL_FLOAT:
          {
             GLfloat *f = (GLfloat *) ((GLubyte *) data + array->StrideB * j);
-            GLuint k;
+            GLint k;
             for (k = 0; k < array->Size; k++) {
                if (IS_INF_OR_NAN(f[k]) ||
                    f[k] >= 1.0e20 || f[k] <= -1.0e10) {
@@ -542,7 +542,7 @@ dump_element_buffer(GLcontext *ctx, GLenum type)
    case GL_UNSIGNED_BYTE:
       {
          const GLubyte *us = (const GLubyte *) map;
-         GLuint i;
+         GLint i;
          for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size; i++) {
             _mesa_printf("%02x ", us[i]);
             if (i % 32 == 31)
@@ -554,7 +554,7 @@ dump_element_buffer(GLcontext *ctx, GLenum type)
    case GL_UNSIGNED_SHORT:
       {
          const GLushort *us = (const GLushort *) map;
-         GLuint i;
+         GLint i;
          for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size / 2; i++) {
             _mesa_printf("%04x ", us[i]);
             if (i % 16 == 15)
@@ -566,7 +566,7 @@ dump_element_buffer(GLcontext *ctx, GLenum type)
    case GL_UNSIGNED_INT:
       {
          const GLuint *us = (const GLuint *) map;
-         GLuint i;
+         GLint i;
          for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size / 4; i++) {
             _mesa_printf("%08x ", us[i]);
             if (i % 8 == 7)
index c445acc..ce40cbb 100644 (file)
@@ -108,12 +108,14 @@ void vbo_split_prims( GLcontext *ctx,
                      vbo_draw_func draw,
                      const struct split_limits *limits )
 {
-   GLuint max_basevertex = prim->basevertex;
+   GLint max_basevertex = prim->basevertex;
    GLuint i;
 
    for (i = 1; i < nr_prims; i++)
       max_basevertex = MAX2(max_basevertex, prim[i].basevertex);
 
+   /* XXX max_basevertex is computed but not used, why? */
+
    if (ib) {
       if (limits->max_indices == 0) {
         /* Could traverse the indices, re-emitting vertices in turn.