radeonsi: silence a Coverity warning
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 10 May 2017 16:45:40 +0000 (18:45 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 16 May 2017 14:11:54 +0000 (16:11 +0200)
Coverity doesn't understand that we'll never pass non-NULL for vertex
shaders.

This is a bit lame, actually. A straightforward cross-procedural analysis
limited to this source file should be enough to prove that there's no
NULL-pointer dereference. Oh well.

CID: 1405999
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c

index d08a8fcf0eccb735a9c8d9924e8f3605fd56e8d3..d1159ad5e27c6fe206c81d47d816d86070a49fdf 100644 (file)
@@ -478,6 +478,8 @@ static void si_dump_descriptors(struct si_context *sctx,
        };
 
        if (processor == PIPE_SHADER_VERTEX) {
+               assert(info); /* only CS may not have an info struct */
+
                si_dump_descriptor_list(&sctx->vertex_buffers, shader_name[processor],
                                        " - Vertex buffer", info->num_inputs, f);
        }