[Piglit] [PATCH] gl-3.2-adj-prims: Silence Coverity uninitialized pointer read defect.
Vinson Lee
vlee at freedesktop.org
Tue Jun 14 19:30:07 UTC 2016
Coverity does not see that make_gs_program is never called with an
unhandled input_prim value.
CID: 1362490
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/spec/gl-3.2/adj-prims.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/spec/gl-3.2/adj-prims.c b/tests/spec/gl-3.2/adj-prims.c
index a215d60ea0d7..2df764e66d49 100644
--- a/tests/spec/gl-3.2/adj-prims.c
+++ b/tests/spec/gl-3.2/adj-prims.c
@@ -437,6 +437,9 @@ make_gs_program(GLenum input_prim)
case GL_TRIANGLE_STRIP_ADJACENCY:
gs_text = gs_text_triangles;
break;
+ default:
+ assert(!"Unexpected input_prim");
+ return 0;
}
program = piglit_build_simple_program_unlinked_multiple_shaders(
--
2.7.4
More information about the Piglit
mailing list