From: Bas Nieuwenhuizen Date: Tue, 8 Oct 2019 01:41:50 +0000 (+0200) Subject: amd/llvm: Fix warning due to asserted-only variable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0c930d2844df038eefe2b67d4a7d7ee322ea396;p=mesa.git amd/llvm: Fix warning due to asserted-only variable. [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 --- 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);