From a0c930d2844df038eefe2b67d4a7d7ee322ea396 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Tue, 8 Oct 2019 03:41:50 +0200 Subject: [PATCH] amd/llvm: Fix warning due to asserted-only variable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit [212/893] Compiling C object 'src/amd/llvm/ce8261c@@amd_common_llvm@sta/ac_nir_to_llvm.c.o'. ../mesa/src/amd/llvm/ac_nir_to_llvm.c: In function ‘visit_image_atomic’: ../mesa/src/amd/llvm/ac_nir_to_llvm.c:2636:17: warning: unused variable ‘format’ [-Wunused-variable] 2636 | const GLenum format = nir_intrinsic_format(instr); | ^~~~~~ Reviewed-by: Marek Olšák --- src/amd/llvm/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index bb99c736f78..41b71cd63a5 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -2633,7 +2633,7 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx, instr->intrinsic == nir_intrinsic_bindless_image_atomic_umin || instr->intrinsic == nir_intrinsic_bindless_image_atomic_imax || instr->intrinsic == nir_intrinsic_bindless_image_atomic_umax) { - const GLenum format = nir_intrinsic_format(instr); + ASSERTED const GLenum format = nir_intrinsic_format(instr); assert(format == GL_R32UI || format == GL_R32I); } dim = nir_intrinsic_image_dim(instr); -- 2.30.2