Mesa (master): iris: quiet down static analyzers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 10:59:36 UTC 2020


Module: Mesa
Branch: master
Commit: 56228b03937bb4181f8e5eec00490b2769b3185c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=56228b03937bb4181f8e5eec00490b2769b3185c

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Fri Jul 24 20:01:37 2020 +0200

iris: quiet down static analyzers

Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067>

---

 src/gallium/drivers/iris/iris_bufmgr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index c781f99d4b5..98b1ca683b1 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -333,6 +333,8 @@ vma_free(struct iris_bufmgr *bufmgr,
    if (memzone == IRIS_MEMZONE_BINDER)
       return;
 
+   assert(memzone < ARRAY_SIZE(bufmgr->vma_allocator));
+
    util_vma_heap_free(&bufmgr->vma_allocator[memzone], address, size);
 }
 



More information about the mesa-commit mailing list