diff options
Diffstat (limited to 'src/binary-writer-spec.cc')
-rw-r--r-- | src/binary-writer-spec.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/binary-writer-spec.cc b/src/binary-writer-spec.cc index ed726475..d4b7f20d 100644 --- a/src/binary-writer-spec.cc +++ b/src/binary-writer-spec.cc @@ -31,15 +31,22 @@ namespace wabt { namespace { struct Context { + Context(); + MemoryStream json_stream; StringSlice source_filename; StringSlice module_filename_noext; - bool write_modules; /* Whether to write the modules files. */ + bool write_modules = false; /* Whether to write the modules files. */ const WriteBinarySpecOptions* spec_options; - Result result; - size_t num_modules; + Result result = Result::Ok; + size_t num_modules = 0; }; +Context::Context() { + WABT_ZERO_MEMORY(source_filename); + WABT_ZERO_MEMORY(module_filename_noext); +} + } // namespace static void convert_backslash_to_slash(char* s, size_t length) { |