From: WuZhen Date: Thu, 28 Apr 2016 07:34:55 +0000 (+0800) Subject: tgsi: initialize stack allocated struct X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=798f7a8596e3ff3f57a44812d7fd005f53f5557c;p=mesa.git tgsi: initialize stack allocated struct Cc: "11.2 11.1" Signed-off-by: Chih-Wei Huang Reviewed-by: Emil Velikov --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 473fed11b61..0d8bd1b6a1f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -437,6 +437,7 @@ tgsi_dump_declaration( const struct tgsi_full_declaration *decl ) { struct dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); ctx.dump_printf = dump_ctx_printf; @@ -485,6 +486,7 @@ void tgsi_dump_property( const struct tgsi_full_property *prop ) { struct dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); ctx.dump_printf = dump_ctx_printf; @@ -516,6 +518,7 @@ tgsi_dump_immediate( const struct tgsi_full_immediate *imm ) { struct dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); ctx.dump_printf = dump_ctx_printf; @@ -684,6 +687,7 @@ tgsi_dump_instruction( uint instno ) { struct dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); ctx.instno = instno; ctx.immno = instno; @@ -724,6 +728,7 @@ void tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file) { struct dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); init_dump_ctx(&ctx, flags); @@ -782,6 +787,7 @@ tgsi_dump_str( size_t size) { struct str_dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); init_dump_ctx(&ctx.base, flags); @@ -806,6 +812,7 @@ tgsi_dump_instruction_str( size_t size) { struct str_dump_ctx ctx; + memset(&ctx, 0, sizeof(ctx)); ctx.base.instno = instno; ctx.base.immno = instno;