From: Jakob Bornecrantz Date: Sat, 26 Feb 2011 19:12:27 +0000 (+0100) Subject: gallivm: Initialize stack values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11f9ec5422b45f2bbcffec26f692a6a22e0aaef2;p=mesa.git gallivm: Initialize stack values valgrind gives me a warning with llvmpipe with profile builds but not debug builds, this seems to fix the issue at least. --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index e685f4b73f0..1fec3adf5b1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -832,14 +832,14 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld, LLVMValueRef *colors_out) { LLVMBuilderRef builder = bld->gallivm->builder; - LLVMValueRef size0; - LLVMValueRef size1; - LLVMValueRef row_stride0_vec; - LLVMValueRef row_stride1_vec; - LLVMValueRef img_stride0_vec; - LLVMValueRef img_stride1_vec; - LLVMValueRef data_ptr0; - LLVMValueRef data_ptr1; + LLVMValueRef size0 = NULL; + LLVMValueRef size1 = NULL; + LLVMValueRef row_stride0_vec = NULL; + LLVMValueRef row_stride1_vec = NULL; + LLVMValueRef img_stride0_vec = NULL; + LLVMValueRef img_stride1_vec = NULL; + LLVMValueRef data_ptr0 = NULL; + LLVMValueRef data_ptr1 = NULL; LLVMValueRef colors0[4], colors1[4]; unsigned chan;