[Mesa-dev] [PATCH] st/mesa: Ensure dst in compile_instruction is initialized.
Brian Paul
brianp at vmware.com
Thu Aug 2 07:16:50 PDT 2012
On 08/02/2012 12:26 AM, Vinson Lee wrote:
> Fixes uninitialized scalar variable defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
> src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
> index 90af1b0..4d99b17 100644
> --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
> +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
> @@ -680,7 +680,7 @@ compile_instruction(
> {
> struct ureg_program *ureg = t->ureg;
> GLuint i;
> - struct ureg_dst dst[1];
> + struct ureg_dst dst[1] = { { 0 } };
> struct ureg_src src[4];
> unsigned num_dst;
> unsigned num_src;
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list