Skip to content

Commit

Permalink
Add format attribute to stackTraceFmt().
Browse files Browse the repository at this point in the history
Let the compiler know this is a printf-style function so a non-literal format is allowed.

Found on MacOS M1.
  • Loading branch information
dwsteele committed Jan 22, 2021
1 parent a5ebaab commit 185a508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/stackTrace.c
Expand Up @@ -290,7 +290,7 @@ stackTracePop(const char *fileName, const char *functionName, bool test)
/***********************************************************************************************************************************
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, ...)
{
va_list argumentList;
Expand Down

0 comments on commit 185a508

Please sign in to comment.