Mesa (master): llvmpipe: silence 'variable may be used uninitialized' warnings
Brian Paul
brianp at kemper.freedesktop.org
Tue Oct 3 20:39:07 UTC 2017
Module: Mesa
Branch: master
Commit: 33122e8a3db8a2e5a3d512e398ae2c96cf544af3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33122e8a3db8a2e5a3d512e398ae2c96cf544af3
Author: Brian Paul <brianp at vmware.com>
Date: Tue Oct 3 13:55:38 2017 -0600
llvmpipe: silence 'variable may be used uninitialized' warnings
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
---
src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | 2 +-
src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index 2f723857f4..36dedba34f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -532,7 +532,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
util_format_fits_8unorm(format_desc) &&
type.width == 8 && type.norm == 1 && type.sign == 0 &&
type.fixed == 0 && type.floating == 0) {
- LLVMValueRef packed, res, chans[4], rgba[4];
+ LLVMValueRef packed, res = NULL, chans[4], rgba[4];
LLVMTypeRef dst_vec_type, conv_vec_type;
struct lp_type fetch_type, conv_type;
struct lp_build_context bld_conv;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 9a43f01738..05984b346e 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -2777,7 +2777,7 @@ generate_variant(struct llvmpipe_context *lp,
const struct lp_fragment_shader_variant_key *key)
{
struct lp_fragment_shader_variant *variant;
- const struct util_format_description *cbuf0_format_desc;
+ const struct util_format_description *cbuf0_format_desc = NULL;
boolean fullcolormask;
char module_name[64];
More information about the mesa-commit
mailing list