[Piglit] [PATCH] gl-3.2-adj-prims: Silence Coverity uninitialized pointer read defect.
Brian Paul
brianp at vmware.com
Tue Jun 14 20:00:41 UTC 2016
On 06/14/2016 01:30 PM, Vinson Lee wrote:
> 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(
>
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list