From e8b9f2d70b8bfd24a69a5a4390a26e8ed945d8e0 Mon Sep 17 00:00:00 2001 From: "fedor.indutny" Date: Wed, 14 Jan 2015 06:35:24 -0800 Subject: [PATCH] src: fix build on freebsd BUG= R=danno Review URL: https://codereview.chromium.org/839053004 Cr-Commit-Position: refs/heads/master@{#26057} --- src/base/platform/platform-freebsd.cc | 2 +- src/base/platform/platform-posix.cc | 2 +- src/debug.cc | 2 +- src/preparser.h | 2 +- src/unique.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/platform/platform-freebsd.cc b/src/base/platform/platform-freebsd.cc index 507b946..58316f8 100644 --- a/src/base/platform/platform-freebsd.cc +++ b/src/base/platform/platform-freebsd.cc @@ -141,7 +141,7 @@ std::vector OS::GetSharedLibraryAddresses() { if (bytes_read < 8) break; unsigned end = StringToLong(addr_buffer); char buffer[MAP_LENGTH]; - int bytes_read = -1; + bytes_read = -1; do { bytes_read++; if (bytes_read >= MAP_LENGTH - 1) diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc index c2fa26a..64aed2b 100644 --- a/src/base/platform/platform-posix.cc +++ b/src/base/platform/platform-posix.cc @@ -261,7 +261,7 @@ int OS::GetCurrentThreadId() { #elif V8_OS_ANDROID return static_cast(gettid()); #else - return static_cast(pthread_self()); + return static_cast(reinterpret_cast(pthread_self())); #endif } diff --git a/src/debug.cc b/src/debug.cc index e3cadda..dd3ec6e 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -573,7 +573,7 @@ void Debug::ThreadInit() { thread_local_.step_out_fp_ = 0; // TODO(isolates): frames_are_dropped_? base::NoBarrier_Store(&thread_local_.current_debug_scope_, - static_cast(NULL)); + static_cast(0)); thread_local_.restarter_frame_function_pointer_ = NULL; } diff --git a/src/preparser.h b/src/preparser.h index 2ffd358..8dffa41 100644 --- a/src/preparser.h +++ b/src/preparser.h @@ -467,7 +467,7 @@ class ParserBase : public Traits { void ReportMessageAt(Scanner::Location location, const char* message, bool is_reference_error = false) { Traits::ReportMessageAt(location, message, - reinterpret_cast(NULL), + reinterpret_cast(0), is_reference_error); } diff --git a/src/unique.h b/src/unique.h index 9232f85..321eb36 100644 --- a/src/unique.h +++ b/src/unique.h @@ -117,7 +117,7 @@ class Unique { // TODO(titzer): this is a hack to migrate to Unique incrementally. static Unique CreateUninitialized(Handle handle) { - return Unique(reinterpret_cast
(NULL), handle); + return Unique(NULL, handle); } static Unique CreateImmovable(Handle handle) { -- 2.7.4