[Mesa-dev] [PATCH 2/2] mesa: Always return a value in _mesa_format_from_format_and_type

Iago Toral Quiroga itoral at igalia.com
Mon May 4 02:24:33 PDT 2015


Return MESA_FORMAT_NONE if no matching type was found. We have an
assertion here, but we should return something anyway to avoid
confusion with non-debug builds.
---
 src/mesa/main/glformats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 8ced579..fddd048 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -2752,4 +2752,5 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
     * format in that case.
     */
    unreachable("Unsupported format");
+   return MESA_FORMAT_NONE;
 }
-- 
1.9.1



More information about the mesa-dev mailing list