mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 13:00:21 +01:00
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 <robert.foss@collabora.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
875b15eec4
commit
25f2d3c1d3
1 changed files with 1 additions and 0 deletions
|
|
@ -177,6 +177,7 @@ num_sources_from_inst(const struct gen_device_info *devinfo,
|
|||
return 0;
|
||||
}
|
||||
} else {
|
||||
assert(desc->nsrc < 4);
|
||||
return desc->nsrc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue