diff options
-rw-r--r-- | third_party/mesa/MesaLib/src/egl/main/eglconfig.h | 7 | ||||
-rw-r--r-- | third_party/mesa/README.chromium | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/third_party/mesa/MesaLib/src/egl/main/eglconfig.h b/third_party/mesa/MesaLib/src/egl/main/eglconfig.h index 5eda345..2e1fa86 100644 --- a/third_party/mesa/MesaLib/src/egl/main/eglconfig.h +++ b/third_party/mesa/MesaLib/src/egl/main/eglconfig.h @@ -38,7 +38,7 @@ struct _egl_config /** * Given a key, return an index into the storage of the config. - * Return -1 if the key is invalid. + * The key must be valid, or an assertion may be thrown. */ static INLINE EGLint _eglIndexConfig(const _EGLConfig *conf, EGLint key) @@ -54,7 +54,8 @@ _eglIndexConfig(const _EGLConfig *conf, EGLint key) return _EGL_CONFIG_FIRST_EXTRA_ATTRIB; #endif default: - return -1; + assert(0); + return 0; } } @@ -82,7 +83,6 @@ static INLINE void _eglSetConfigKey(_EGLConfig *conf, EGLint key, EGLint val) { EGLint idx = _eglIndexConfig(conf, key); - assert(idx >= 0); conf->Storage[idx] = val; } @@ -94,7 +94,6 @@ static INLINE EGLint _eglGetConfigKey(const _EGLConfig *conf, EGLint key) { EGLint idx = _eglIndexConfig(conf, key); - assert(idx >= 0); return conf->Storage[idx]; } diff --git a/third_party/mesa/README.chromium b/third_party/mesa/README.chromium index c19eb9b..de5da73 100644 --- a/third_party/mesa/README.chromium +++ b/third_party/mesa/README.chromium @@ -78,3 +78,7 @@ Later modifications (see chromium.patch): - Fixed compiler warning about cast to pointer from integer of different size in eglapi.c line 276. Replaced void* with EGLNativeDisplayType. + +- Suppressed spurious compiler warning from gcc in eglCompareConfig by + reorganizing the .h a little + |