diff --git a/src/unwind/unwind_with_execinfo.cpp b/src/unwind/unwind_with_execinfo.cpp index 836a712..24df5d7 100644 --- a/src/unwind/unwind_with_execinfo.cpp +++ b/src/unwind/unwind_with_execinfo.cpp @@ -14,7 +14,7 @@ namespace cpptrace { namespace detail { CPPTRACE_FORCE_NO_INLINE std::vector capture_frames(size_t skip, size_t max_depth) { - skip += 2; // TODO: Not sure where the other 1 comes from + skip++; std::vector addrs(std::min(hard_max_frames, skip + max_depth), nullptr); const int n_frames = backtrace(addrs.data(), static_cast(addrs.size())); // thread safe std::vector frames(n_frames - skip, 0); diff --git a/src/unwind/unwind_with_nothing.cpp b/src/unwind/unwind_with_nothing.cpp index f1dbb5c..2abc362 100644 --- a/src/unwind/unwind_with_nothing.cpp +++ b/src/unwind/unwind_with_nothing.cpp @@ -7,7 +7,7 @@ namespace cpptrace { namespace detail { - std::vector capture_frames(size_t skip, size_t max_depth) { + std::vector capture_frames(size_t, size_t) { return {}; } }