[Mesa-dev] [PATCH 3/8] mesa: Silence GCC warning in _mesa_test_texobj_completeness

Ian Romanick idr at freedesktop.org
Tue Nov 26 15:54:18 PST 2013


From: Ian Romanick <ian.d.romanick at intel.com>

main/texobj.c: In function '_mesa_test_texobj_completeness':
main/texobj.c:553:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main/texobj.c:553:193: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main/texobj.c:553:254: warning: signed and unsigned type in conditional expression [-Wsign-compare]
main/texobj.c:553:148: warning: signed and unsigned type in conditional expression [-Wsign-compare]

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/texobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 4c3d468..012e873 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -552,7 +552,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
 
    t->_MaxLevel = MIN3(t->MaxLevel,
                        /* 'p' in the GL spec */
-                       baseLevel + baseImage->MaxNumLevels - 1,
+                       (int) (baseLevel + baseImage->MaxNumLevels - 1),
                        /* 'q' in the GL spec */
                        maxLevels - 1);
 
-- 
1.8.1.4



More information about the mesa-dev mailing list