From 807835c2377a88b6d54d011f782cbf8d067c448b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Schw=C3=B6rer?= Date: Sun, 31 May 2020 15:45:39 +0200 Subject: [PATCH] Use C++ style casts --- src/sys/boutexception.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sys/boutexception.cxx b/src/sys/boutexception.cxx index 7433222a63..307a9f2e39 100644 --- a/src/sys/boutexception.cxx +++ b/src/sys/boutexception.cxx @@ -53,8 +53,8 @@ std::string BoutException::getBacktrace() const { void * ptr=trace[i]; if (dladdr(trace[i],&info)){ // Additionally, check whether this is the default offset for an executable - if (info.dli_fbase != (void*)0x400000) - ptr=(void*) ((size_t)trace[i]-(size_t)info.dli_fbase); + if (info.dli_fbase != reinterpret_cast(0x400000)) + ptr=reinterpret_cast(reinterpret_cast(trace[i])-reinterpret_cast(info.dli_fbase))); } // Pipe stderr to /dev/null to avoid cluttering output