Module: Mesa Branch: master Commit: 80c288603300a06ac1585769cc491711c3d1b4f0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80c288603300a06ac1585769cc491711c3d1b4f0
Author: Rob Clark <robcl...@freedesktop.org> Date: Thu Jun 2 11:47:11 2016 -0400 freedreno/a4xx: silence coverity warning CID 1362451 Signed-off-by: Rob Clark <robcl...@freedesktop.org> --- src/gallium/drivers/freedreno/a4xx/fd4_program.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c index 9dc4ebb..4590c0e 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c @@ -121,6 +121,12 @@ emit_shader(struct fd_ringbuffer *ring, const struct ir3_shader_variant *so) OUT_RELOC(ring, so->bo, 0, CP_LOAD_STATE_1_STATE_TYPE(ST_SHADER), 0); } + + /* for how clever coverity is, it is sometimes rather dull, and + * doesn't realize that the only case where bin==NULL, sz==0: + */ + assume(bin || (sz == 0)); + for (i = 0; i < sz; i++) { OUT_RING(ring, bin[i]); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit