Mesa (master): gallivm: init vars to silence gcc warnings

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 7 19:51:10 UTC 2017


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr  5 13:53:41 2017 -0600

gallivm: init vars to silence gcc warnings

Silence warnings about using possibly uninitialized values.

Signed-off-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_sample.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index a4b3a7b834..a1dc61d40f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -1412,8 +1412,8 @@ lp_build_unnormalized_coords(struct lp_build_sample_context *bld,
 {
    const unsigned dims = bld->dims;
    LLVMValueRef width;
-   LLVMValueRef height;
-   LLVMValueRef depth;
+   LLVMValueRef height = NULL;
+   LLVMValueRef depth = NULL;
 
    lp_build_extract_image_sizes(bld,
                                 &bld->float_size_bld,




More information about the mesa-commit mailing list