diff options
author | Eric Engestrom <[email protected]> | 2018-10-28 18:20:20 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-10-30 18:10:59 +0000 |
commit | ea738a91de4f418d371b76d93de2d326ab613b42 (patch) | |
tree | 9f68f228dc7d04af697f3bec28db31507ad60a80 /src/egl/drivers/dri2/egl_dri2.c | |
parent | d0d6ec549db243c95e9e8c949eabb247c7b87ac7 (diff) |
egl: add messages to a few assert() and turn a couple into unreachable()
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index c5fa935657e..8b482c90be0 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -341,7 +341,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, _eglLinkConfig(&conf->base); } else { - assert(0); + unreachable("duplicates should not be possible"); return NULL; } @@ -1108,7 +1108,7 @@ dri2_create_context_attribs_error(int dri_error) break; default: - assert(0); + assert(!"unknown dri_error code"); egl_error = EGL_BAD_MATCH; break; } @@ -1815,7 +1815,7 @@ dri2_release_tex_image(_EGLDriver *drv, target = GL_TEXTURE_2D; break; default: - assert(0); + assert(!"missing texture target"); } if (dri2_dpy->tex_buffer->base.version >= 3 && @@ -1878,7 +1878,7 @@ egl_error_from_dri_image_error(int dri_error) case __DRI_IMAGE_ERROR_BAD_ACCESS: return EGL_BAD_ACCESS; default: - assert(0); + assert(!"unknown dri_error code"); return EGL_BAD_ALLOC; } } |