[Mesa-dev] [PATCH] egl/dri2: Fix GCC maybe-uninitialized warning.
Vinson Lee
vlee at freedesktop.org
Fri Mar 6 23:08:00 PST 2015
egl_dri2.c: In function ‘dri2_bind_tex_image’:
egl_dri2.c:1240:4: warning: ‘format’ may be used uninitialized in this function [-Wmaybe-uninitialized]
(*dri2_dpy->tex_buffer->setTexBuffer2)(dri2_ctx->dri_context,
^
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/egl/drivers/dri2/egl_dri2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d503196..88022e0 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1227,6 +1227,7 @@ dri2_bind_tex_image(_EGLDriver *drv,
break;
default:
assert(0);
+ format = 0;
}
switch (dri2_surf->base.TextureTarget) {
--
2.3.1
More information about the mesa-dev
mailing list