Re: [Mesa-dev] [PATCH] glsl: Initialize outputs[] array in lower_blend_equation_advanced.
Reviewed-by: Iago Toral QuirogaOn Mon, 2016-08-29 at 19:16 -0700, Kenneth Graunke wrote: > Caught by Coverity. Likely fixes real issues if an output component > is not present. > > CID: 1372278 > Signed-off-by: Kenneth Graunke > --- > src/compiler/glsl/lower_blend_equation_advanced.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/compiler/glsl/lower_blend_equation_advanced.cpp > b/src/compiler/glsl/lower_blend_equation_advanced.cpp > index a998df1..1d03392 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) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] 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--- src/compiler/glsl/lower_blend_equation_advanced.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_blend_equation_advanced.cpp b/src/compiler/glsl/lower_blend_equation_advanced.cpp index a998df1..1d03392 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) -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev