summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-05-29 16:01:37 -0600
committerBrian Paul <[email protected]>2015-06-01 07:42:04 -0600
commit54070a9d1db332853609a31e5da76126d8f9445a (patch)
treefd8da722e43b5bbe64862ea7075a3fe4bf4972c4 /src/egl/drivers/dri2/egl_dri2.c
parent87813c504a8a72198a6a4e8de9e5905fd751ac2c (diff)
egl/dri2: silence uninitialized variable warnings
And update assertions to be more informative. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index fe5cbc8815d..8b915ef54d0 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1256,7 +1256,8 @@ dri2_bind_tex_image(_EGLDriver *drv,
format = __DRI_TEXTURE_FORMAT_RGBA;
break;
default:
- assert(0);
+ assert(!"Unexpected texture format in dri2_bind_tex_image()");
+ format = __DRI_TEXTURE_FORMAT_RGBA;
}
switch (dri2_surf->base.TextureTarget) {
@@ -1264,7 +1265,8 @@ dri2_bind_tex_image(_EGLDriver *drv,
target = GL_TEXTURE_2D;
break;
default:
- assert(0);
+ target = GL_TEXTURE_2D;
+ assert(!"Unexpected texture target in dri2_bind_tex_image()");
}
(*dri2_dpy->tex_buffer->setTexBuffer2)(dri2_ctx->dri_context,