From 9e411426f20a994ff0051ad502c569d4c5859ad1 Mon Sep 17 00:00:00 2001 From: malavan Date: Mon, 19 Jul 2021 17:29:43 +0000 Subject: [PATCH] dd comment and set eip unused Former-commit-id: 7707fe15a9c9774820b3afb9837a50e73c40a5a8 --- src/debug.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debug.cpp b/src/debug.cpp index 7a2c16255..1a0926c9d 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1606,7 +1606,11 @@ void safe_write(int fd, const void *pv, ssize_t cb) #ifdef UNW_LOCAL_ONLY -void logStackTrace(void *eip, int uplevel) { +/* Logs the stack trace using the libunwind call. + * The eip argument is unused as libunwind only gets local context. + * The uplevel argument indicates how many of the calling functions to skip. + */ +void logStackTrace(void * __unused eip, int uplevel) { int fd = openDirectLogFiledes(); if (fd == -1) return; /* If we can't log there is anything to do. */