Mesa (master): gallivm: Silence uninitialized variable warning.

Vinson Lee vlee at kemper.freedesktop.org
Thu Oct 21 18:29:15 UTC 2010


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Thu Oct 21 11:27:35 2010 -0700

gallivm: Silence uninitialized variable warning.

Fixes this GCC warning.
gallivm/lp_bld_tgsi_aos.c: In function 'lp_build_tgsi_aos':
gallivm/lp_bld_tgsi_aos.c:516: warning: 'dst0' may be used uninitialized in this function
gallivm/lp_bld_tgsi_aos.c:516: note: 'dst0' was declared here

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
index d5f963b..c3c082b 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
@@ -513,7 +513,7 @@ emit_instruction(
 {
    LLVMValueRef src0, src1, src2;
    LLVMValueRef tmp0, tmp1;
-   LLVMValueRef dst0;
+   LLVMValueRef dst0 = NULL;
 
    /*
     * Stores and write masks are handled in a general fashion after the long




More information about the mesa-commit mailing list