mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 01:00:10 +01:00
freedreno: fix coverity negative array index warning
Never can happen, since query would not have been created in the first place if pidx(query_type) return negative. Lets let coverity realize this. CID 1362460 Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
ba452d43e0
commit
1632b0eac0
1 changed files with 2 additions and 0 deletions
|
|
@ -61,6 +61,8 @@ get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
struct fd_hw_sample *samp = NULL;
|
||||
int idx = pidx(query_type);
|
||||
|
||||
assume(idx >= 0); /* query never would have been created otherwise */
|
||||
|
||||
if (!ctx->sample_cache[idx]) {
|
||||
ctx->sample_cache[idx] =
|
||||
ctx->sample_providers[idx]->get_sample(ctx, ring);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue