llvmpipe: silence 'variable may be used uninitialized' warnings
authorBrian Paul <brianp@vmware.com>
Tue, 3 Oct 2017 19:55:38 +0000 (13:55 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 3 Oct 2017 20:33:00 +0000 (14:33 -0600)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
src/gallium/drivers/llvmpipe/lp_state_fs.c

index 2f723857f4b7d2916b9a52626d41a776342de5a5..36dedba34f037015b40f400352dcddbc62c3a4d6 100644 (file)
@@ -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;
index 9a43f01738ba303c22a234dd6f49cd325165d979..05984b346e0071888a51278159766f1ed4aadee5 100644 (file)
@@ -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];