From: Eric Anholt Date: Sat, 10 Feb 2018 16:32:57 +0000 (+0000) Subject: egl/gbm: Fix compiler warning about visual matching. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b97eb02b0e60cce7f74346e6c647286097b0542;p=mesa.git egl/gbm: Fix compiler warning about visual matching. The compiler doesn't know that num_visuals > 0. Fixes: 37a8d907cc16 ("egl/gbm: Ensure EGLConfigs match GBM surface format") Reviewed-by: Daniel Stone --- diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 3eabd678e92..01fa1f11b95 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -95,7 +95,7 @@ dri2_drm_config_is_compatible(struct dri2_egl_display *dri2_dpy, const __DRIconfig *config, struct gbm_surface *surface) { - const struct gbm_dri_visual *visual; + const struct gbm_dri_visual *visual = NULL; unsigned int red, green, blue, alpha; int i;