From 0b97eb02b0e60cce7f74346e6c647286097b0542 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 10 Feb 2018 16:32:57 +0000 Subject: [PATCH] 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 --- src/egl/drivers/dri2/platform_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2