AIX: fix another may be uninitialized failure
authormichael_dawson <michael_dawson@ca.ibm.com>
Wed, 3 Jun 2015 07:23:15 +0000 (00:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 3 Jun 2015 07:23:30 +0000 (07:23 +0000)
fix two additional cases in heap.cc where the AIX
compiler is now reporting that a variable may be
uninitialized.

R=svenpanne@chromium.org, mbrandy@us.ibm.com

BUG=

Review URL: https://codereview.chromium.org/1157053007

Cr-Commit-Position: refs/heads/master@{#28779}

src/heap/heap.cc

index 2a1445e..29348ea 100644 (file)
@@ -4412,7 +4412,7 @@ AllocationResult Heap::AllocateFixedArrayWithFiller(int length,
   if (length == 0) return empty_fixed_array();
 
   DCHECK(!InNewSpace(filler));
-  HeapObject* result;
+  HeapObject* result = nullptr;
   {
     AllocationResult allocation = AllocateRawFixedArray(length, pretenure);
     if (!allocation.To(&result)) return allocation;
@@ -4509,7 +4509,7 @@ AllocationResult Heap::AllocateExtendedConstantPoolArray(
   int size = ConstantPoolArray::SizeForExtended(small, extended);
   AllocationSpace space = SelectSpace(size, TENURED);
 
-  HeapObject* object;
+  HeapObject* object = nullptr;
   {
     AllocationResult allocation =
         AllocateRaw(size, space, OLD_SPACE, kDoubleAligned);