From: Samuel Pitoiset Date: Mon, 25 Nov 2019 07:51:16 +0000 (+0100) Subject: ac/llvm: fix warning in ac_build_canonicalize() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6770b9726c9721da4a8c77008979efdf39bc3b3;p=mesa.git ac/llvm: fix warning in ac_build_canonicalize() ../src/amd/llvm/ac_llvm_build.c: In function ‘ac_build_canonicalize’: ../src/amd/llvm/ac_llvm_build.c:4567:9: warning: ‘intr’ may be used uninitialized in this function [-Wmaybe-uninitialized] 4567 | return ac_build_intrinsic(ctx, intr, type, params, 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4568 | AC_FUNC_ATTR_READNONE); | ~~~~~~~~~~~~~~~~~~~~~~ ../src/amd/llvm/ac_llvm_build.c:4567:9: warning: ‘type’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Samuel Pitoiset Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index 60213fdd5d7..1cd687366d7 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -4553,7 +4553,7 @@ ac_build_canonicalize(struct ac_llvm_context *ctx, LLVMValueRef src0, } else if (bitsize == 32) { intr = "llvm.canonicalize.f32"; type = ctx->f32; - } else if (bitsize == 64) { + } else { intr = "llvm.canonicalize.f64"; type = ctx->f64; }