Mesa (master): llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 19 00:13:35 UTC 2020
Module: Mesa
Branch: master
Commit: ce611935df5e7e6cc731523c7496c33ba6f7ef20
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce611935df5e7e6cc731523c7496c33ba6f7ef20
Author: Eric Anholt <eric at anholt.net>
Date: Mon Dec 16 20:05:18 2019 -0800
llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit.
The condition for the use matches the def, but you can't trust a compiler
to notice.
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>
---
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 38e92cb67d3..8dad6082390 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -3483,7 +3483,7 @@ load_emit(
scalar_ptr = is_shared ? bld->shared_ptr : bld->ssbos[buf];
- LLVMValueRef ssbo_limit;
+ LLVMValueRef ssbo_limit = NULL;
if (!is_shared) {
ssbo_limit = LLVMBuildAShr(gallivm->builder, bld->ssbo_sizes[buf], lp_build_const_int32(gallivm, 2), "");
@@ -3602,7 +3602,7 @@ store_emit(
scalar_ptr = is_shared ? bld->shared_ptr : bld->ssbos[buf];
- LLVMValueRef ssbo_limit;
+ LLVMValueRef ssbo_limit = NULL;
if (!is_shared) {
ssbo_limit = LLVMBuildAShr(gallivm->builder, bld->ssbo_sizes[buf], lp_build_const_int32(gallivm, 2), "");
More information about the mesa-commit
mailing list