[Mesa-dev] [PATCH] tgsi: init translate ctx to zeros

Marek Olšák maraeo at gmail.com
Mon Mar 25 15:03:06 PDT 2013


I sent almost the same patch 3 days ago. I should have given it a
better commit message:

http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg36038.html

Marek

On Mon, Mar 25, 2013 at 10:54 PM, Brian Paul <brianp at vmware.com> wrote:
> Fixes uninitialized member bug spotted by Ondrej Holecek.
>
> Note: This is a candidate for the stable branches.
> ---
>  src/gallium/auxiliary/tgsi/tgsi_text.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
> index 6b97bee..fd243a5 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_text.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
> @@ -1570,7 +1570,7 @@ tgsi_text_translate(
>     struct tgsi_token *tokens,
>     uint num_tokens )
>  {
> -   struct translate_ctx ctx;
> +   struct translate_ctx ctx = { 0 };
>
>     ctx.text = text;
>     ctx.cur = text;
> --
> 1.7.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list