1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Add format attribute to stackTraceFmt().

Let the compiler know this is a printf-style function so a non-literal format is allowed.

Found on MacOS M1.
This commit is contained in:
David Steele
2021-01-22 09:50:29 -05:00
parent a5ebaab249
commit 185a508f44

View File

@@ -290,7 +290,7 @@ stackTracePop(const char *fileName, const char *functionName, bool test)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Stack trace format Stack trace format
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
static size_t __attribute__((format(printf, 4, 5))) static size_t
stackTraceFmt(char *buffer, size_t bufferSize, size_t bufferUsed, const char *format, ...) stackTraceFmt(char *buffer, size_t bufferSize, size_t bufferUsed, const char *format, ...)
{ {
va_list argumentList; va_list argumentList;