[Mesa-dev] [PATCH] mesa/main: Fix missing return in non void function

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Thu Aug 25 13:46:47 UTC 2016


This was found by obs:
I: Program returns random data in a function
E: Mesa no-return-in-nonvoid-function main/program_resource.c:109

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
 src/mesa/main/program_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c
index 6ddbdad..a390866 100644
--- a/src/mesa/main/program_resource.c
+++ b/src/mesa/main/program_resource.c
@@ -104,7 +104,7 @@ stage_from_program_interface(GLenum programInterface)
    case GL_COMPUTE_SUBROUTINE_UNIFORM:
       return MESA_SHADER_COMPUTE;
    default:
-      assert(!"unexpected programInterface value");
+      unreachable(!"unexpected programInterface value");
    }
 }
 
-- 
2.9.3



More information about the mesa-dev mailing list