Zero-initialize implicit io_buffer locals

This commit is contained in:
Nigel Tao committed 2018-12-27 12:22:32 +11:00
1 parent e55ce7d798
commit 23cd084b53
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -296,7 +296,7 @@ func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error {
}
if typ.IsIOType() {
b.printf("wuffs_base__io_buffer %s%s;\n", uPrefix, name)
b.printf("wuffs_base__io_buffer %s%s = {};\n", uPrefix, name)
preName := vPrefix + name
// TODO: io0_etc variables?
b.printf("uint8_t* %s%s = NULL;\n", iopPrefix, preName)