egl: Fix several 'comparison between signed and unsigned integer' warnings
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Sep 2010 17:54:28 +0000 (10:54 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Sep 2010 17:55:38 +0000 (10:55 -0700)
I hate GCC for requiring the (int) cast on sizeof.

src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/glx/egl_glx.c

index 2b6e36876dcdb21ff7c936757a42c7e1f9d50390..d17a2ab88c20918892d98bd6f80e69808696049f 100644 (file)
@@ -292,7 +292,7 @@ dri2_process_buffers(struct dri2_egl_surface *dri2_surf,
    struct dri2_egl_display *dri2_dpy =
       dri2_egl_display(dri2_surf->base.Resource.Display);
    xcb_rectangle_t rectangle;
-   int i;
+   unsigned i;
 
    dri2_surf->buffer_count = count;
    dri2_surf->have_fake_front = 0;
@@ -1386,7 +1386,7 @@ dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
    xcb_rectangle_t rectangles[16];
    int i;
 
-   if (numRects > ARRAY_SIZE(rectangles))
+   if (numRects > (int)ARRAY_SIZE(rectangles))
       return dri2_copy_region(drv, disp, draw, dri2_surf->region);
 
    /* FIXME: Invert y here? */
index 29bc8033d7deade19775cbdb473dd24665d8b9c3..8a46f9c4a61a83473f25c82cc1f703ce149b4922 100644 (file)
@@ -162,7 +162,8 @@ static EGLBoolean
 convert_fbconfig(Display *dpy, GLXFBConfig fbconfig,
                  struct GLX_egl_config *GLX_conf)
 {
-   int err = 0, attr, egl_attr, val, i;
+   int err = 0, attr, egl_attr, val;
+   unsigned i;
    EGLint conformant, config_caveat, surface_type;
 
    for (i = 0; i < ARRAY_SIZE(fbconfig_attributes); i++) {
@@ -243,7 +244,8 @@ static EGLBoolean
 convert_visual(Display *dpy, XVisualInfo *vinfo,
                struct GLX_egl_config *GLX_conf)
 {
-   int err, attr, egl_attr, val, i;
+   int err, attr, egl_attr, val;
+   unsigned i;
    EGLint conformant, config_caveat, surface_type;
 
    /* the visual must support OpenGL */