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

Unified Diff: runtime/bin/dartutils.cc

Issue 22381002: Fixes to get Dart VM compiling on Ubuntu 13.04, Debian Wheezy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Convince gcc that len is always initialized before use. Created 7 years, 4 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 | « no previous file | runtime/bin/file_linux.cc » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index a90694d8733b4dd010cba34fa359402940967b9b..a2fdf9d41eaa02300ea89395139c32191a8342dd 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -364,12 +364,12 @@ Dart_Handle DartUtils::ReadStringFromHttp(const char* script_uri) {
static const uint8_t* ReadFileFully(const char* filename,
intptr_t* file_len,
const char** error_msg) {
+ *file_len = -1;
void* stream = DartUtils::OpenFile(filename, false);
if (stream == NULL) {
SET_ERROR_MSG(error_msg, "Unable to open file: %s", filename);
return NULL;
}
- *file_len = -1;
const uint8_t* text_buffer = NULL;
siva 2013/08/06 22:53:43 Not sure I understand why *file_len = 1 needs to b
Chris Bracken 2013/08/07 06:12:57 ReadStringFromFile() and LoadScript() both call th
DartUtils::ReadFile(&text_buffer, file_len, stream);
if (text_buffer == NULL || *file_len == -1) {
« no previous file with comments | « no previous file | runtime/bin/file_linux.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698