[Mesa-dev] [PATCH 2/3] gallivm: init vars to silence warnings

Brian Paul brianp at vmware.com
Mon Mar 25 09:25:24 PDT 2013


---
 src/gallium/drivers/llvmpipe/lp_state_fs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index b87e1a4..de51f39 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1219,7 +1219,7 @@ convert_to_blend_type(struct gallivm_state *gallivm,
 
    for (i = 0; i < num_srcs; ++i) {
       LLVMValueRef chans[4];
-      LLVMValueRef res;
+      LLVMValueRef res = NULL;
       unsigned sa = 0;
 
       dst[i] = LLVMBuildZExt(builder, src[i], lp_build_vec_type(gallivm, src_type), "");
@@ -1368,7 +1368,7 @@ convert_from_blend_type(struct gallivm_state *gallivm,
 
    for (i = 0; i < num_srcs; ++i) {
       LLVMValueRef chans[4];
-      LLVMValueRef res;
+      LLVMValueRef res = NULL;
       unsigned sa = 0;
 
       dst[i] = LLVMBuildBitCast(builder, src[i], lp_build_vec_type(gallivm, src_type), "");
-- 
1.7.3.4



More information about the mesa-dev mailing list