Mesa (master): ac/llvm: fix warning in ac_build_canonicalize()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 26 07:59:40 UTC 2019


Module: Mesa
Branch: master
Commit: f6770b9726c9721da4a8c77008979efdf39bc3b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6770b9726c9721da4a8c77008979efdf39bc3b3

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Nov 25 08:51:16 2019 +0100

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 <samuel.pitoiset at gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>

---

 src/amd/llvm/ac_llvm_build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}




More information about the mesa-commit mailing list