Mesa (master): gallium: fix uninitialized variable warning

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 19 23:09:37 UTC 2021


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

Author: Michel Zou <xantares09 at hotmail.com>
Date:   Thu Apr 15 22:38:44 2021 +0200

gallium: fix uninitialized variable warning

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10276>

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index a9c04970cad..31aacef74d6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -305,7 +305,7 @@ static void lp_exec_default(struct lp_exec_mask *mask,
    LLVMBuilderRef builder = mask->bld->gallivm->builder;
    struct function_ctx *ctx = func_ctx(mask);
 
-   int default_exec_pc;
+   int default_exec_pc = 0;
    boolean default_is_last;
 
    if (ctx->switch_stack_size > LP_MAX_TGSI_NESTING) {



More information about the mesa-commit mailing list