[Mesa-dev] [PATCH 12/21] i965: Resolve GCC sign-compare warning.

Rhys Kidd rhyskidd at gmail.com
Sun Aug 2 23:09:13 PDT 2015


mesa/src/mesa/drivers/dri/i965/brw_draw.c: In function 'brw_draw_destroy':
mesa/src/mesa/drivers/dri/i965/brw_draw.c:630:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (i = 0; i < brw->vb.nr_buffers; i++) {
                  ^
mesa/src/mesa/drivers/dri/i965/brw_draw.c:636:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (i = 0; i < brw->vb.nr_enabled; i++) {
                  ^

Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
 src/mesa/drivers/dri/i965/brw_draw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index d57f502..7b0e7cd 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -625,7 +625,7 @@ void brw_draw_init( struct brw_context *brw )
 
 void brw_draw_destroy( struct brw_context *brw )
 {
-   int i;
+   GLuint i;
 
    for (i = 0; i < brw->vb.nr_buffers; i++) {
       drm_intel_bo_unreference(brw->vb.buffers[i].bo);
-- 
2.1.4



More information about the mesa-dev mailing list