demangled_backtrace: Cast a thing to const char* instead of char*

Apparently this is const char* on NetBSD, so it complains.

Since it should be harmless to allow this one to be const, just do
that.
This commit is contained in:
Fabian Homborg 2021-03-05 18:37:49 +01:00
parent 69c71052ef
commit 6bc0064a2a

View File

@ -212,7 +212,7 @@ bool is_windows_subsystem_for_linux() {
status == 0 ? demangled
: info.dli_sname == nullptr ? symbols[i]
: info.dli_sname,
static_cast<char *>(callstack[i]) - static_cast<char *>(info.dli_saddr));
static_cast<char *>(callstack[i]) - static_cast<const char *>(info.dli_saddr));
free(demangled);
} else {
swprintf(text, sizeof(text) / sizeof(wchar_t), L"%-3d %s", i - skip_levels, symbols[i]);