diff --git a/src/demangle/demangle_with_cxxabi.cpp b/src/demangle/demangle_with_cxxabi.cpp index 2e523c6..8306ed4 100644 --- a/src/demangle/demangle_with_cxxabi.cpp +++ b/src/demangle/demangle_with_cxxabi.cpp @@ -18,7 +18,7 @@ namespace cpptrace { // demangled will always be nullptr on non-zero status, and if __cxa_demangle ever fails for any reason // we'll just quietly return the mangled name if(demangled) { - const std::string str = demangled; + std::string str = demangled; // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) std::free(demangled); return str; diff --git a/src/platform/error.hpp b/src/platform/error.hpp index a62020a..54c8737 100644 --- a/src/platform/error.hpp +++ b/src/platform/error.hpp @@ -69,9 +69,9 @@ namespace detail { } template - void nothing() {} + void nullfn() {} - #define PHONY_USE(E) (nothing()) + #define PHONY_USE(E) (nullfn()) // Check condition in both debug and release. std::runtime_error on failure. #define CPPTRACE_VERIFY(c, ...) ( \