From: Brian Paul Date: Fri, 19 Dec 2014 16:36:51 +0000 (-0700) Subject: gallivm: silence a couple compiler warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04e35cc4aac019fbf6ac5ea8f6d772bb6cacea8d;p=mesa.git gallivm: silence a couple compiler warnings Silence warnings about possibly uninitialized variables when making a release build. Reviewed-by: José Fonseca --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index 8cee994ee6d..093c8fcc748 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -411,6 +411,9 @@ lp_build_rho(struct lp_build_sample_context *bld, if (dims > 2) { ddx_ddy[1] = lp_build_abs(coord_bld, ddx_ddy[1]); } + else { + ddx_ddy[1] = NULL; /* silence compiler warning */ + } if (dims < 2) { rho_xvec = lp_build_swizzle_aos(coord_bld, ddx_ddy[0], swizzle0); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 3dfff05c22b..3b2097f8521 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -952,7 +952,7 @@ build_gather(struct lp_build_context *bld, LLVMBuilderRef builder = bld->gallivm->builder; LLVMValueRef res = bld->undef; unsigned i; - LLVMValueRef temp_ptr; + LLVMValueRef temp_ptr = NULL; if (overflow_mask) { temp_ptr = lp_build_alloca(