diff options
author | 2016-01-20 03:56:12 +0000 | |
---|---|---|
committer | 2016-01-20 04:02:21 +0000 | |
commit | 47c83eac0644a4b6092d956dd3a6824bccb7263a (patch) | |
tree | a7a5d0ff7d7f0e6e462240d24f209c045cdfcb76 /compiler/profile_assistant_test.cc | |
parent | 4ca3850acc5e7d24cc623b796fd5d83c7e9aea1a (diff) |
Make sure that OfflineCompilationInfo is set to nullptr when needed.
Local variables weren't initialized when in tests and the early
return in ProcessProfiles didn't make sure that the output
parameter is set to nullptr.
Bug: 26080105
Change-Id: Id88a6abb515c3ab9a6ebac56bc9dac7920c3d58f
Diffstat (limited to 'compiler/profile_assistant_test.cc')
-rw-r--r-- | compiler/profile_assistant_test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/profile_assistant_test.cc b/compiler/profile_assistant_test.cc index cecb865f82..58b7513377 100644 --- a/compiler/profile_assistant_test.cc +++ b/compiler/profile_assistant_test.cc @@ -180,7 +180,7 @@ TEST_F(ProfileAssistantTest, DoNotAdviseCompilation) { SetupProfile("p2", 2, kNumberOfMethodsToSkipCompilation, profile2, &info2); // We should not advise compilation. - ProfileCompilationInfo* result; + ProfileCompilationInfo* result = nullptr; ASSERT_TRUE(ProfileAssistant::ProcessProfiles(profile_fds, reference_profile_fds, &result)); ASSERT_TRUE(result == nullptr); @@ -221,7 +221,7 @@ TEST_F(ProfileAssistantTest, FailProcessingBecauseOfProfiles) { SetupProfile("p1", 2, kNumberOfMethodsToEnableCompilation, profile2, &info2); // We should fail processing. - ProfileCompilationInfo* result; + ProfileCompilationInfo* result = nullptr; ASSERT_FALSE(ProfileAssistant::ProcessProfiles(profile_fds, reference_profile_fds, &result)); ASSERT_TRUE(result == nullptr); @@ -258,7 +258,7 @@ TEST_F(ProfileAssistantTest, FailProcessingBecauseOfReferenceProfiles) { SetupProfile("p1", 2, kNumberOfMethodsToEnableCompilation, reference_profile, &reference_info); // We should not advise compilation. - ProfileCompilationInfo* result; + ProfileCompilationInfo* result = nullptr; ASSERT_TRUE(profile1.GetFile()->ResetOffset()); ASSERT_TRUE(reference_profile.GetFile()->ResetOffset()); ASSERT_FALSE(ProfileAssistant::ProcessProfiles(profile_fds, reference_profile_fds, &result)); |