From: Kenneth Graunke Date: Mon, 29 Aug 2016 04:43:54 +0000 (-0700) Subject: glsl: Initialize outputs[] array in lower_blend_equation_advanced. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66994036517d2cfe4882fc6bf6a6b32649dda5b1;p=mesa.git glsl: Initialize outputs[] array in lower_blend_equation_advanced. Caught by Coverity. Likely fixes real issues if an output component is not present. CID: 1372278 Signed-off-by: Kenneth Graunke Reviewed-by: Iago Toral Quiroga --- diff --git a/src/compiler/glsl/lower_blend_equation_advanced.cpp b/src/compiler/glsl/lower_blend_equation_advanced.cpp index a998df14027..1d033924159 100644 --- a/src/compiler/glsl/lower_blend_equation_advanced.cpp +++ b/src/compiler/glsl/lower_blend_equation_advanced.cpp @@ -497,7 +497,7 @@ lower_blend_equation_advanced(struct gl_linked_shader *sh) * which writes a subset of the components, starting at location_frac. * The variables can't overlap, thankfully. */ - ir_variable *outputs[4]; + ir_variable *outputs[4] = { NULL, NULL, NULL, NULL }; foreach_in_list(ir_instruction, ir, sh->ir) { ir_variable *var = ir->as_variable(); if (!var || var->data.mode != ir_var_shader_out)