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

Unified Diff: src/runtime/runtime-strings.cc

Issue 1163143005: Fix uninitialized variable compiler errors [GCC 4.8.4] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « src/runtime/runtime-scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index 5704807b82b60a62e0887efce7423d7e4e124ec6..000ae4e0dd0f94726404e6ab0547b2503938123e 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -137,7 +137,7 @@ RUNTIME_FUNCTION(Runtime_StringIndexOf) {
CONVERT_ARG_HANDLE_CHECKED(String, pat, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, index, 2);
- uint32_t start_index;
+ uint32_t start_index = 0;
if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1);
RUNTIME_ASSERT(start_index <= static_cast<uint32_t>(sub->length()));
@@ -188,7 +188,7 @@ RUNTIME_FUNCTION(Runtime_StringLastIndexOf) {
CONVERT_ARG_HANDLE_CHECKED(String, pat, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, index, 2);
- uint32_t start_index;
+ uint32_t start_index = 0;
if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1);
uint32_t pat_length = pat->length();
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698