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

Unified Diff: src/log-utils.cc

Issue 390004: Fix warnings on Win64. (Closed)
Patch Set: Created 11 years, 1 month 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
« src/api.cc ('K') | « src/log-utils.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index f327a0a04a79d1f47a5a4cbb8ce01b115ecc29d1..fd9560418c196bdc31a4f750745e7ea58393205b 100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -155,7 +155,7 @@ void Log::OpenMemoryBuffer() {
ASSERT(!IsEnabled());
output_buffer_ = new LogDynamicBuffer(
kDynamicBufferBlockSize, kMaxDynamicBufferSize,
- kDynamicBufferSeal, strlen(kDynamicBufferSeal));
+ kDynamicBufferSeal, StrLength(kDynamicBufferSeal));
Write = WriteToMemory;
Init();
}
@@ -195,7 +195,7 @@ int Log::GetLogLines(int from_pos, char* dest_buf, int max_size) {
// Find previous log line boundary.
char* end_pos = dest_buf + actual_size - 1;
while (end_pos >= dest_buf && *end_pos != '\n') --end_pos;
- actual_size = end_pos - dest_buf + 1;
+ actual_size = static_cast<int>(end_pos - dest_buf + 1);
ASSERT(actual_size <= max_size);
return actual_size;
}
@@ -352,7 +352,7 @@ void LogMessageBuilder::WriteToLogFile() {
void LogMessageBuilder::WriteCStringToLogFile(const char* str) {
- const int len = strlen(str);
+ const int len = StrLength(str);
const int written = Log::Write(str, len);
if (written != len && write_failure_handler != NULL) {
write_failure_handler();
@@ -461,7 +461,7 @@ bool LogRecordCompressor::RetrievePreviousCompressed(
--data_ptr;
}
const intptr_t truncated_len = prev_end - prev_ptr;
- const int copy_from_pos = data_ptr - data.start();
+ const int copy_from_pos = static_cast<int>(data_ptr - data.start());
// Check if the length of compressed tail is enough.
if (truncated_len <= kMaxBackwardReferenceSize
&& truncated_len <= GetBackwardReferenceSize(distance, copy_from_pos)) {
@@ -493,7 +493,7 @@ bool LogRecordCompressor::RetrievePreviousCompressed(
prev_record->start() + unchanged_len, best.backref_size + 1);
PrintBackwardReference(backref, best.distance, best.copy_from_pos);
ASSERT(strlen(backref.start()) - best.backref_size == 0);
- prev_record->Truncate(unchanged_len + best.backref_size);
+ prev_record->Truncate(static_cast<int>(unchanged_len + best.backref_size));
}
return true;
}
« src/api.cc ('K') | « src/log-utils.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698