Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Unified Diff: minidump/minidump_exception_writer_test.cc

Issue 897863004: win: potentially uninitialized locals in minidump_exception_writer_test.cc (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump_test-7
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_exception_writer_test.cc
diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc
index b798191f3ce0c1de3177befe2d2955ce154e236f..35c8efa8228f7095bd79caa4a3e4a8d66cf4797b 100644
--- a/minidump/minidump_exception_writer_test.cc
+++ b/minidump/minidump_exception_writer_test.cc
@@ -110,14 +110,14 @@ TEST(MinidumpExceptionWriter, Minimal) {
StringFileWriter file_writer;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
- const MINIDUMP_EXCEPTION_STREAM* observed_exception_stream;
+ const MINIDUMP_EXCEPTION_STREAM* observed_exception_stream = nullptr;
ASSERT_NO_FATAL_FAILURE(
GetExceptionStream(file_writer.string(), &observed_exception_stream));
MINIDUMP_EXCEPTION_STREAM expected_exception_stream = {};
expected_exception_stream.ThreadContext.DataSize = sizeof(MinidumpContextX86);
- const MinidumpContextX86* observed_context;
+ const MinidumpContextX86* observed_context = nullptr;
ASSERT_NO_FATAL_FAILURE(ExpectExceptionStream(&expected_exception_stream,
observed_exception_stream,
file_writer.string(),
@@ -169,7 +169,7 @@ TEST(MinidumpExceptionWriter, Standard) {
StringFileWriter file_writer;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
- const MINIDUMP_EXCEPTION_STREAM* observed_exception_stream;
+ const MINIDUMP_EXCEPTION_STREAM* observed_exception_stream = nullptr;
ASSERT_NO_FATAL_FAILURE(
GetExceptionStream(file_writer.string(), &observed_exception_stream));
@@ -188,7 +188,7 @@ TEST(MinidumpExceptionWriter, Standard) {
}
expected_exception_stream.ThreadContext.DataSize = sizeof(MinidumpContextX86);
- const MinidumpContextX86* observed_context;
+ const MinidumpContextX86* observed_context = nullptr;
ASSERT_NO_FATAL_FAILURE(ExpectExceptionStream(&expected_exception_stream,
observed_exception_stream,
file_writer.string(),
@@ -241,10 +241,10 @@ TEST(MinidumpExceptionWriter, InitializeFromSnapshot) {
StringFileWriter file_writer;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
- const MINIDUMP_EXCEPTION_STREAM* exception;
+ const MINIDUMP_EXCEPTION_STREAM* exception = nullptr;
ASSERT_NO_FATAL_FAILURE(GetExceptionStream(file_writer.string(), &exception));
- const MinidumpContextX86* observed_context;
+ const MinidumpContextX86* observed_context = nullptr;
ASSERT_NO_FATAL_FAILURE(ExpectExceptionStream(&expect_exception,
exception,
file_writer.string(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698