mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-20 01:17:49 +02:00
Make sure functions/types needed for profiling are defined.
Profiling runs with debugging disabled but the tests still need TestError and stackTraceTestFileLineSet() to be valid even if they are noops.
This commit is contained in:
@@ -56,6 +56,9 @@ typedef struct ErrorType ErrorType;
|
||||
// Declare test error
|
||||
#ifndef NDEBUG
|
||||
ERROR_DECLARE(TestError);
|
||||
#else
|
||||
// Must always be defined since it might be needed to compile (though not used) during profiling
|
||||
#define TestError AssertError
|
||||
#endif
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
||||
@@ -44,6 +44,9 @@ Internal Functions
|
||||
|
||||
// Set line number for the current function on the stack
|
||||
void stackTraceTestFileLineSet(unsigned int fileLine);
|
||||
#else
|
||||
// Must always be valid since it might be needed to compile (though not used) during profiling
|
||||
#define stackTraceTestFileLineSet(fileLine)
|
||||
#endif
|
||||
|
||||
// Push a new function onto the trace stack
|
||||
|
||||
Reference in New Issue
Block a user