[Mesa-dev] [PATCH 1/2] mesa: silence signed/unsigned comparison warnings

Brian Paul brianp at vmware.com
Tue Nov 22 16:28:09 PST 2011


---
 src/mesa/main/uniform_query.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 33ba53c..dbaeacb 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -648,7 +648,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
       if (offset >= uni->array_elements)
 	 return;
 
-      count = MIN2(count, (uni->array_elements - offset));
+      count = MIN2((unsigned) count, (uni->array_elements - offset));
    }
 
    FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -797,7 +797,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
       if (offset >= uni->array_elements)
 	 return;
 
-      count = MIN2(count, (uni->array_elements - offset));
+      count = MIN2((unsigned) count, (uni->array_elements - offset));
    }
 
    FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
-- 
1.7.3.4



More information about the mesa-dev mailing list