1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +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:
David Steele 2020-06-16 15:40:32 -04:00
parent 0680cfc8dc
commit 6a851994f3
2 changed files with 6 additions and 0 deletions

View File

@ -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
/***********************************************************************************************************************************

View File

@ -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