mesa/glx: Resolve GCC sign-compare warning.
authorRhys Kidd <rhyskidd@gmail.com>
Thu, 6 Aug 2015 06:34:04 +0000 (16:34 +1000)
committerMatt Turner <mattst88@gmail.com>
Tue, 18 Aug 2015 18:34:43 +0000 (11:34 -0700)
mesa/src/glx/dri_common.c: In function 'scalarEqual':
mesa/src/glx/dri_common.c:259:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (i = 0; i < ARRAY_SIZE(attribMap); i++)
                  ^

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/glx/dri_common.c

index 63c8de38c7c38277178b0419d4aef03d99c7cdef..eedcd46a15a2de4a99410ce7678cfab0ee326406 100644 (file)
@@ -253,8 +253,7 @@ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
 static int
 scalarEqual(struct glx_config *mode, unsigned int attrib, unsigned int value)
 {
-   unsigned int glxValue;
-   int i;
+   unsigned glxValue, i;
 
    for (i = 0; i < ARRAY_SIZE(attribMap); i++)
       if (attribMap[i].attrib == attrib) {