From f5dda2390f4a799e802a19758b3030f991e5209e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 27 Sep 2022 07:23:44 -0700 Subject: [PATCH] Logging: remove const from the lambda calling dladdr In some OSes, the function takes a plain void*. Fixes: QTBUG-106980 Change-Id: I810d70e579eb4e2c8e45fffd1718bdaf94d8ac0e Reviewed-by: Alexey Edelev (cherry picked from commit 7d7d4671bd641634bd7ab8fd523ca96f7cda95ee) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index ad43c89724d..dc169ce5fce 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1302,7 +1302,7 @@ static QStringList backtraceFramesForLogMessage(int frameCount) // use dladdr() instead of backtrace_symbols() QString cachedLibrary; const char *cachedFname = nullptr; - auto decodeFrame = [&](const void *addr) -> DecodedFrame { + auto decodeFrame = [&](void *addr) -> DecodedFrame { Dl_info info; if (!dladdr(addr, &info)) return {};