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

Unified Diff: src/objects.cc

Issue 11669020: Fix build warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | src/string-stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 4f2cc96a0914573b374bf1e3702401951bdb5cb4..20553eb64bc94889c24418fab89dca2eeadf3346 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1068,7 +1068,7 @@ void String::StringShortPrint(StringStream* accumulator) {
if (ascii) {
accumulator->Add("<String[%u]: ", length());
for (int i = 0; i < len; i++) {
- accumulator->Put(stream.GetNext());
+ accumulator->Put(static_cast<char>(stream.GetNext()));
}
accumulator->Put('>');
} else {
@@ -1086,7 +1086,7 @@ void String::StringShortPrint(StringStream* accumulator) {
} else if (c < 32 || c > 126) {
accumulator->Add("\\x%02x", c);
} else {
- accumulator->Put(c);
+ accumulator->Put(static_cast<char>(c));
}
}
if (truncated) {
@@ -7533,7 +7533,7 @@ class StringComparator {
class State {
public:
explicit inline State(ConsStringIteratorOp* op)
- : op_(op) {}
+ : op_(op), is_one_byte_(true), length_(0), buffer8_(NULL) {}
inline void Init(String* string, unsigned len) {
op_->Reset();
@@ -7567,8 +7567,8 @@ class StringComparator {
}
// Advance state.
ASSERT(op_->HasMore());
- int32_t type;
- unsigned length;
+ int32_t type = 0;
+ unsigned length = 0;
String* next = op_->ContinueOperation(&type, &length);
ASSERT(next != NULL);
ConsStringNullOp null_op;
@@ -7577,7 +7577,6 @@ class StringComparator {
ConsStringIteratorOp* const op_;
bool is_one_byte_;
- unsigned offset_;
unsigned length_;
union {
const uint8_t* buffer8_;
« no previous file with comments | « no previous file | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698