gallivm: Initialize stack values
authorJakob Bornecrantz <jakob@vmware.com>
Sat, 26 Feb 2011 19:12:27 +0000 (20:12 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Sat, 26 Feb 2011 19:13:08 +0000 (20:13 +0100)
valgrind gives me a warning with llvmpipe with profile builds but
not debug builds, this seems to fix the issue at least.

src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c

index e685f4b73f0ce7775ea42233ed2a2d4cce717990..1fec3adf5b1848d74552e676f4cb4a3d3b66d6e1 100644 (file)
@@ -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;