diff options
author | jessicag.feedback@gmail.com <jessicag.feedback@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-09-16 20:52:06 +0000 |
---|---|---|
committer | jessicag.feedback@gmail.com <jessicag.feedback@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-09-16 20:52:06 +0000 |
commit | df9901a45dac4b5162943f631168296f9d05ee20 (patch) | |
tree | c173ce981ba489c9024e8aa860a80a5e2e9facae | |
parent | Add a free() to ExceptionHandlerTest.ChildCrash. (diff) | |
download | breakpad-df9901a45dac4b5162943f631168296f9d05ee20.tar.xz |
Initialize variables that currently may theoretically be used uninitialized
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@688 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/processor/postfix_evaluator-inl.h | 7 | ||||
-rw-r--r-- | src/processor/range_map_unittest.cc | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/processor/postfix_evaluator-inl.h b/src/processor/postfix_evaluator-inl.h index 06314125..b24f092c 100644 --- a/src/processor/postfix_evaluator-inl.h +++ b/src/processor/postfix_evaluator-inl.h @@ -100,7 +100,8 @@ bool PostfixEvaluator<ValueType>::EvaluateInternal( if (operation != BINARY_OP_NONE) { // Get the operands. - ValueType operand1, operand2; + ValueType operand1 = ValueType(); + ValueType operand2 = ValueType(); if (!PopValues(&operand1, &operand2)) { BPLOG(ERROR) << "Could not PopValues to get two values for binary " "operation " << token << ": " << expression; @@ -257,7 +258,7 @@ PostfixEvaluator<ValueType>::PopValueOrIdentifier( // '-' sign (6.0.13); others do not (6.0.9). Since we require it, we // handle it explicitly here. istringstream token_stream(token); - ValueType literal; + ValueType literal = ValueType(); bool negative; if (token_stream.peek() == '-') { negative = true; @@ -283,7 +284,7 @@ PostfixEvaluator<ValueType>::PopValueOrIdentifier( template<typename ValueType> bool PostfixEvaluator<ValueType>::PopValue(ValueType *value) { - ValueType literal; + ValueType literal = ValueType(); string token; PopResult result; if ((result = PopValueOrIdentifier(&literal, &token)) == POP_RESULT_FAIL) { diff --git a/src/processor/range_map_unittest.cc b/src/processor/range_map_unittest.cc index 88e93be4..996ae6d7 100644 --- a/src/processor/range_map_unittest.cc +++ b/src/processor/range_map_unittest.cc @@ -165,8 +165,8 @@ static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) { } linked_ptr<CountedObject> object; - AddressType retrieved_base; - AddressType retrieved_size; + AddressType retrieved_base = AddressType(); + AddressType retrieved_size = AddressType(); bool retrieved = range_map->RetrieveRange(address, &object, &retrieved_base, &retrieved_size); @@ -209,8 +209,8 @@ static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) { expected_nearest = false; linked_ptr<CountedObject> nearest_object; - AddressType nearest_base; - AddressType nearest_size; + AddressType nearest_base = AddressType(); + AddressType nearest_size = AddressType(); bool retrieved_nearest = range_map->RetrieveNearestRange(address, &nearest_object, &nearest_base, |