summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2015-01-13 15:54:17 +0000
committerFedor Indutny <fedor@indutny.com>2015-01-13 20:36:43 +0300
commitb949437c0087f1582dea1496733872fce7f3deb0 (patch)
tree83d6b4357d2698bc06bbbcb23cde7ea09bb7737b /deps
parentfa004f3c1b1cb17e12a236096c1d3bb053feed28 (diff)
downloadnode-new-b949437c0087f1582dea1496733872fce7f3deb0.tar.gz
deps: fix v8 build on FreeBSD
clang++ on FreeBSD was blaming v8 for using invalid casts from nullptr: reinterpret_cast from 'nullptr_t' to '...' is not allowed Replace casts with NULL, or NULL with 0 where applicable. Fix #324 PR-URL: https://github.com/iojs/io.js/pull/332 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/base/platform/platform-freebsd.cc2
-rw-r--r--deps/v8/src/base/platform/platform-posix.cc2
-rw-r--r--deps/v8/src/debug.cc2
-rw-r--r--deps/v8/src/preparser.h2
-rw-r--r--deps/v8/src/unique.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/deps/v8/src/base/platform/platform-freebsd.cc b/deps/v8/src/base/platform/platform-freebsd.cc
index 507b946f69..58316f8bc1 100644
--- a/deps/v8/src/base/platform/platform-freebsd.cc
+++ b/deps/v8/src/base/platform/platform-freebsd.cc
@@ -141,7 +141,7 @@ std::vector<OS::SharedLibraryAddress> 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/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc
index c2fa26a9ea..64aed2b8d1 100644
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -261,7 +261,7 @@ int OS::GetCurrentThreadId() {
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
#else
- return static_cast<int>(pthread_self());
+ return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
#endif
}
diff --git a/deps/v8/src/debug.cc b/deps/v8/src/debug.cc
index 93ef1cfc09..cdcb0a759f 100644
--- a/deps/v8/src/debug.cc
+++ b/deps/v8/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<base::AtomicWord>(NULL));
+ static_cast<base::AtomicWord>(0));
thread_local_.restarter_frame_function_pointer_ = NULL;
}
diff --git a/deps/v8/src/preparser.h b/deps/v8/src/preparser.h
index 18004a5096..ad27744e9d 100644
--- a/deps/v8/src/preparser.h
+++ b/deps/v8/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<const char*>(NULL),
+ reinterpret_cast<const char*>(0),
is_reference_error);
}
diff --git a/deps/v8/src/unique.h b/deps/v8/src/unique.h
index 9232f85970..321eb3683d 100644
--- a/deps/v8/src/unique.h
+++ b/deps/v8/src/unique.h
@@ -117,7 +117,7 @@ class Unique {
// TODO(titzer): this is a hack to migrate to Unique<T> incrementally.
static Unique<T> CreateUninitialized(Handle<T> handle) {
- return Unique<T>(reinterpret_cast<Address>(NULL), handle);
+ return Unique<T>(NULL, handle);
}
static Unique<T> CreateImmovable(Handle<T> handle) {