summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-02-10 16:32:57 +0000
committerDaniel Stone <[email protected]>2018-02-12 09:16:44 +0000
commit0b97eb02b0e60cce7f74346e6c647286097b0542 (patch)
treee07817a629d8c8c1b3fea6ec922e7f8d022fc122 /src/egl/drivers/dri2
parent831fb29252859c8aaf2bc1c2573a83f30d664204 (diff)
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 <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c2
1 files changed, 1 insertions, 1 deletions
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;