From b75063bea8741a5d90e56f77c9d48b919d832e5e Mon Sep 17 00:00:00 2001 From: "ulan@chromium.org" Date: Wed, 17 Jul 2013 08:46:44 +0000 Subject: [PATCH] Do not call reinterpret_cast when converting from NULL. If NULL is a nullptr (such as on my FreeBSD system), it is not possible to use reinterpret_cast to convert it to another pointer. Plus, just using NULL directly achieves the same effect. R=ulan@chromium.org Review URL: https://chromiumcodereview.appspot.com/19388005 Patch from Raphael Kubo da Costa . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.cc | 2 +- src/stub-cache.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heap.cc b/src/heap.cc index c4cc40ca26..792178e99d 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -7350,7 +7350,7 @@ void HeapIterator::reset() { #ifdef DEBUG -Object* const PathTracer::kAnyGlobalObject = reinterpret_cast(NULL); +Object* const PathTracer::kAnyGlobalObject = NULL; class PathTracer::MarkVisitor: public ObjectVisitor { public: diff --git a/src/stub-cache.cc b/src/stub-cache.cc index a687d81a3e..dec7a9db00 100644 --- a/src/stub-cache.cc +++ b/src/stub-cache.cc @@ -1539,7 +1539,7 @@ Handle StubCompiler::GetCodeWithFlags(Code::Flags flags, Handle name) { return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) ? GetCodeWithFlags(flags, *Handle::cast(name)->ToCString()) - : GetCodeWithFlags(flags, reinterpret_cast(NULL)); + : GetCodeWithFlags(flags, NULL); }