intel/perf: Fix unused var warning in release builds.
authorEric Anholt <eric@anholt.net>
Thu, 9 Jul 2020 17:06:08 +0000 (10:06 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 17:44:17 +0000 (17:44 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5829>

src/intel/perf/gen_perf.c

index 26dc497e48672fe0323c7852dd140531e90c0a9f..f31b15aa4b26ac3f9b32129bd4bae059b54fc0a2 100644 (file)
@@ -866,7 +866,7 @@ gen_perf_get_counters_passes(struct gen_perf_config *perf,
                              struct gen_perf_counter_pass *counter_pass)
 {
    uint64_t queries_mask = get_passes_mask(perf, counter_indices, counter_indices_count);
-   uint32_t n_passes = __builtin_popcount(queries_mask);
+   ASSERTED uint32_t n_passes = __builtin_popcount(queries_mask);
 
    for (uint32_t i = 0; i < counter_indices_count; i++) {
       assert(counter_indices[i] < perf->n_counters);