i965: Resolve GCC sign-compare warning.
authorRhys Kidd <rhyskidd@gmail.com>
Thu, 6 Aug 2015 06:34:10 +0000 (16:34 +1000)
committerMatt Turner <mattst88@gmail.com>
Tue, 18 Aug 2015 18:34:44 +0000 (11:34 -0700)
mesa/src/mesa/drivers/dri/i965/brw_primitive_restart.c: In function 'can_cut_index_handle_prims':
mesa/src/mesa/drivers/dri/i965/brw_primitive_restart.c:94:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int i = 0; i < nr_prims; i++) {
                      ^

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/mesa/drivers/dri/i965/brw_primitive_restart.c

index 6ed79d7cb753b18e98a9acb1f85c09f3ded0786e..c8d90027ea0f7fcf6655d57a963f90dfaa8c8614 100644 (file)
@@ -91,7 +91,7 @@ can_cut_index_handle_prims(struct gl_context *ctx,
       return false;
    }
 
-   for (int i = 0; i < nr_prims; i++) {
+   for (unsigned i = 0; i < nr_prims; i++) {
       switch (prim[i].mode) {
       case GL_POINTS:
       case GL_LINES: