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

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


mesa/src/mesa/drivers/dri/i965/brw_state_cache.c: In function 'brw_try_upload_using_copy':
mesa/src/mesa/drivers/dri/i965/brw_state_cache.c:216:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (i = 0; i < cache->size; i++) {
                  ^

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

diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index 693441c..a849f4c 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -210,7 +210,7 @@ brw_try_upload_using_copy(struct brw_cache *cache,
 			  const void *aux)
 {
    struct brw_context *brw = cache->brw;
-   int i;
+   GLuint i;
    struct brw_cache_item *item;
 
    for (i = 0; i < cache->size; i++) {
-- 
2.1.4



More information about the mesa-dev mailing list