mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Fix build warnings for TRACY_NO_CALLSTACK
Fix build warnings about undefined TRACY_HAS_CALLSTACK and an unused argument for Callstack() when TRACY_NO_CALLSTACK is defined.
This commit is contained in:
parent
ac031e64d6
commit
278330af5b
@ -31,7 +31,8 @@
|
|||||||
#include "client/TracyAlloc.cpp"
|
#include "client/TracyAlloc.cpp"
|
||||||
#include "client/TracyOverride.cpp"
|
#include "client/TracyOverride.cpp"
|
||||||
|
|
||||||
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
|
#if defined(TRACY_HAS_CALLSTACK)
|
||||||
|
# if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
|
||||||
# include "libbacktrace/alloc.cpp"
|
# include "libbacktrace/alloc.cpp"
|
||||||
# include "libbacktrace/dwarf.cpp"
|
# include "libbacktrace/dwarf.cpp"
|
||||||
# include "libbacktrace/fileline.cpp"
|
# include "libbacktrace/fileline.cpp"
|
||||||
@ -45,6 +46,7 @@
|
|||||||
# include "libbacktrace/elf.cpp"
|
# include "libbacktrace/elf.cpp"
|
||||||
# endif
|
# endif
|
||||||
# include "common/TracyStackFrames.cpp"
|
# include "common/TracyStackFrames.cpp"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -5,6 +5,15 @@
|
|||||||
#include "../common/TracyForceInline.hpp"
|
#include "../common/TracyForceInline.hpp"
|
||||||
#include "TracyCallstack.h"
|
#include "TracyCallstack.h"
|
||||||
|
|
||||||
|
#ifndef TRACY_HAS_CALLSTACK
|
||||||
|
|
||||||
|
namespace tracy
|
||||||
|
{
|
||||||
|
static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 5
|
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 5
|
||||||
# include <unwind.h>
|
# include <unwind.h>
|
||||||
#elif TRACY_HAS_CALLSTACK >= 3
|
#elif TRACY_HAS_CALLSTACK >= 3
|
||||||
@ -17,15 +26,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TRACY_HAS_CALLSTACK
|
|
||||||
|
|
||||||
namespace tracy
|
|
||||||
{
|
|
||||||
static tracy_force_inline void* Callstack( int depth ) { return nullptr; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifdef TRACY_DEBUGINFOD
|
#ifdef TRACY_DEBUGINFOD
|
||||||
# include <elfutils/debuginfod.h>
|
# include <elfutils/debuginfod.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user