This is an automated email from the ASF dual-hosted git repository.
mzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 663bfa6 Initialized a few bool variables to avoid compilation issues.
663bfa6 is described below
commit 663bfa68b6ab68f4c28ed6a01ac42ac2ad23ac07
Author: Meng Zhu <[email protected]>
AuthorDate: Sun Jun 2 23:23:11 2019 -0700
Initialized a few bool variables to avoid compilation issues.
---
src/master/allocator/mesos/hierarchical.cpp | 2 +-
src/tests/resources_tests.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/master/allocator/mesos/hierarchical.cpp
b/src/master/allocator/mesos/hierarchical.cpp
index 3391d7e..aa4c438 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -1639,7 +1639,7 @@ void HierarchicalAllocatorProcess::__allocate()
//
// TODO(mzhu): remove this once we can determine if there is any non-default
// quota set by looking into the allocator memory state in constant time.
- bool logHeadroomInfo;
+ bool logHeadroomInfo = false;
// We charge a role against its quota by considering its allocation
// (including all subrole allocations) as well as any unallocated
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index 6063c01..bbac851 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -1928,7 +1928,7 @@ TEST(ResourcesTest, ShrinkToQuantities)
// Repeat the same chopping for 1000 times, expecting the chopping
// result to be different from the first time at least once.
const size_t count = 1000u;
- bool atLeastDifferentOnce;
+ bool atLeastDifferentOnce = false;
for (size_t i = 0; i < count; i++) {
if (shrink(combinedDisk20, "disk:10") != shrunk10) {
@@ -1994,7 +1994,7 @@ TEST(ResourcesTest, ShrinkToLimits)
// Repeat the same chopping for 1000 times, expecting the chopping
// result to be different from the first time at least once.
const size_t count = 1000u;
- bool atLeastDifferentOnce;
+ bool atLeastDifferentOnce = false;
for (size_t i = 0; i < count; i++) {
if (shrink(combinedDisk20, "disk:10") != shrunk10) {