From 7d8d99ea129a367497512ec8df25b5995e32a2b7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 24 Dec 2020 13:59:36 -0800 Subject: [PATCH] turnip: Remove unsigned nonnegative check. index is of type uint32_t. Fix defect reported by Coverity Scan. Macro compares unsigned to 0 (NO_EFFECT) unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. index >= 0U. Signed-off-by: Vinson Lee Part-of: --- src/freedreno/vulkan/tu_query.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_query.c b/src/freedreno/vulkan/tu_query.c index af8192a1956..da8330057a6 100644 --- a/src/freedreno/vulkan/tu_query.c +++ b/src/freedreno/vulkan/tu_query.c @@ -202,8 +202,6 @@ perfcntr_index(const struct fd_perfcntr_group *group, uint32_t group_count, break; } index -= group[i].num_countables; - - assert(index >= 0); } assert(i < group_count);