Merge pull request #54 from reventlov/fix_uninitialized_memory_in_test
Fix uninitialized memory in test code.
diff --git a/compiler/back_end/cpp/testcode/uint_sizes_test.cc b/compiler/back_end/cpp/testcode/uint_sizes_test.cc
index 3b0cab4..cf8a7dd 100644
--- a/compiler/back_end/cpp/testcode/uint_sizes_test.cc
+++ b/compiler/back_end/cpp/testcode/uint_sizes_test.cc
@@ -360,7 +360,7 @@
}
TEST(SizesWriter, CanWriteExplicitlySizedEnumSizes) {
- ::std::uint8_t buffer[sizeof kExplicitlySizedEnumSizes];
+ ::std::uint8_t buffer[sizeof kExplicitlySizedEnumSizes] = {0};
auto writer = ExplicitlySizedEnumSizesWriter(buffer, sizeof buffer);
writer.one_byte().Write(ExplicitlySizedEnum::VALUE1);
writer.two_byte().Write(ExplicitlySizedEnum::VALUE10);