summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-10-28 18:20:20 +0000
committerEric Engestrom <[email protected]>2018-10-30 18:10:59 +0000
commitea738a91de4f418d371b76d93de2d326ab613b42 (patch)
tree9f68f228dc7d04af697f3bec28db31507ad60a80 /src
parentd0d6ec549db243c95e9e8c949eabb247c7b87ac7 (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')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c8
-rw-r--r--src/egl/main/eglconfig.c4
2 files changed, 6 insertions, 6 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;
}
}
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 0456adf3caa..a346f937bf3 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -327,7 +327,7 @@ _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching)
valid = EGL_FALSE;
break;
default:
- assert(0);
+ unreachable("check _eglValidationTable[]");
break;
}
break;
@@ -353,7 +353,7 @@ _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching)
EGL_OPENGL_BIT;
break;
default:
- assert(0);
+ unreachable("check _eglValidationTable[]");
mask = 0;
break;
}