From da65d18f0ebf28cb8a829a946d51d7111f6b493a Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sat, 6 Oct 2018 14:46:11 +0330 Subject: update --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index be28da3..e3c72e1 100755 --- a/main.py +++ b/main.py @@ -305,14 +305,14 @@ class CodeGen(object): dummy_string += ", " + elem.attrib["name"] + "*" + " dummy_" + elem.attrib["name"] read_source.write(static + inline + text.c_read_elem_sig.replace("YYY", elem.attrib["name"]).replace("XXX", elem.attrib["name"]+pointer)) read_source.write("*dummy = "+alloc+"(sizeof(" + elem.attrib["name"] + "));\n") - read_source.write("uint64_t b_count;\n") + read_source.write("uint64_t b_count = 0;\n") if count_version: count_version_buffer = static + inline + text.c_read_elem_sig_c.replace("YYY", elem.attrib["name"]).replace("XXX", elem.attrib["name"]+pointer) count_version_buffer += "*dummy = "+alloc+"(sizeof(" + elem.attrib["name"] + "));\n" - count_version_buffer += "uint64_t b_count;\n" + count_version_buffer += "uint64_t b_count = 0;\n" for sub in elem: if "sizeconst" in sub.attrib: - read_source.write("uint64_t agg_b_count;\n") + read_source.write("uint64_t agg_b_count = 0;\n") break read_source.write(text.c_void_manager_proto.replace("XXX", "(*dummy)")); if count_version: count_version_buffer += text.c_void_manager_proto.replace("XXX", "(*dummy)") -- cgit v1.2.3