From: Eric Engestrom Date: Mon, 22 Aug 2016 20:52:03 +0000 (+0100) Subject: egl: turn a couple asserts static (compile-time) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49dad1aafda974dd676dfd2c87da071749e1334f;p=mesa.git egl: turn a couple asserts static (compile-time) Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index 435d9245384..6161d26e4de 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -38,6 +38,7 @@ #include #include "c99_compat.h" +#include "eglcompiler.h" #include "eglconfig.h" #include "egldisplay.h" #include "eglcurrent.h" @@ -598,14 +599,14 @@ _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2, return 0; /* the enum values have the desired ordering */ - assert(EGL_NONE < EGL_SLOW_CONFIG); - assert(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG); + STATIC_ASSERT(EGL_NONE < EGL_SLOW_CONFIG); + STATIC_ASSERT(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG); val1 = conf1->ConfigCaveat - conf2->ConfigCaveat; if (val1) return val1; /* the enum values have the desired ordering */ - assert(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER); + STATIC_ASSERT(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER); val1 = conf1->ColorBufferType - conf2->ColorBufferType; if (val1) return val1;