From: Eric Anholt Date: Tue, 25 Aug 2020 18:27:50 +0000 (-0700) Subject: vc4: Fix unused var warnings in release builds from assertions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=689e36ebfe4a12240dbb8caa4618f303bbd968d6;p=mesa.git vc4: Fix unused var warnings in release builds from assertions. Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index d2a92518863..0d448fa2754 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -115,7 +115,7 @@ indirect_uniform_load(struct vc4_compile *c, nir_intrinsic_instr *intr) static struct qreg vc4_ubo_load(struct vc4_compile *c, nir_intrinsic_instr *intr) { - int buffer_index = nir_src_as_uint(intr->src[0]); + ASSERTED int buffer_index = nir_src_as_uint(intr->src[0]); assert(buffer_index == 1); assert(c->stage == QSTAGE_FRAG); diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c index 2ce5a759633..b3379b16c11 100644 --- a/src/gallium/drivers/vc4/vc4_simulator.c +++ b/src/gallium/drivers/vc4/vc4_simulator.c @@ -421,7 +421,7 @@ vc4_simulator_submit_cl_ioctl(int fd, struct drm_vc4_submit_cl *args) list_for_each_entry_safe(struct drm_vc4_bo, bo, &exec.unref_list, unref_head) { struct vc4_simulator_bo *sim_bo = (struct vc4_simulator_bo *)bo; - struct drm_gem_cma_object *obj = &sim_bo->base.base; + ASSERTED struct drm_gem_cma_object *obj = &sim_bo->base.base; list_del(&bo->unref_head); assert(*(uint32_t *)(obj->vaddr + obj->base.size) == BO_SENTINEL);