diff options
author | Robert Foss <[email protected]> | 2017-02-01 11:24:39 -0500 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2017-02-01 16:47:05 +0000 |
commit | 25f2d3c1d3328ed4e95547e89dddbe73c423fc9e (patch) | |
tree | 0b7f451b08f0c9eb4df68033a6f567e8f8a8e614 /src/mesa/drivers | |
parent | 875b15eec4c1a0cab986f5eccfc54e3c0df02f7c (diff) |
i965: Prevent coverity warning
Add assert checking that num_sources is never larger than 3.
This prevents Coverity from concluding that the unhandled
cases of num_sources not being 0-3 are relevant.
Coverity-Id: 1399480-1399489
Signed-off-by: Robert Foss <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_validate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index 226539445d9..64615af44ac 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_validate.c +++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c @@ -177,6 +177,7 @@ num_sources_from_inst(const struct gen_device_info *devinfo, return 0; } } else { + assert(desc->nsrc < 4); return desc->nsrc; } |