diff options
author | WuZhen <[email protected]> | 2016-04-28 15:34:55 +0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-05-01 12:31:29 +0100 |
commit | 798f7a8596e3ff3f57a44812d7fd005f53f5557c (patch) | |
tree | f9740195c9d46025394f305e0ca9c66e2f7b8212 /src/gallium/auxiliary/tgsi | |
parent | fb653641ea342efa253097d3a01533d634ae32ed (diff) |
tgsi: initialize stack allocated struct
Cc: "11.2 11.1" <[email protected]>
Signed-off-by: Chih-Wei Huang <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; |