Mesa (master): radeonsi: silence a Coverity warning
Nicolai Hähnle
nh at kemper.freedesktop.org
Tue May 16 14:12:05 UTC 2017
Module: Mesa
Branch: master
Commit: 3811730a3756fbe9d7dd2dc5974a9ef6094b86be
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3811730a3756fbe9d7dd2dc5974a9ef6094b86be
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: Wed May 10 18:45:40 2017 +0200
radeonsi: silence a Coverity warning
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 at amd.com>
---
src/gallium/drivers/radeonsi/si_debug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index d08a8fcf0e..d1159ad5e2 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -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);
}
More information about the mesa-commit
mailing list