add GNU __attribute__((__format__(printf,...))) to new aprintf function

This commit is contained in:
axxel
2024-09-13 09:46:37 +02:00
committed by Marcus Meissner
parent 578ec6324d
commit bfbdc60600

View File

@@ -212,12 +212,18 @@ __attribute__((__format__(printf,4,5)))
gpi_string_list_to_flags(const char *str[],
const StringFlagItem *map);
/* Allocates a sufficiently large buffer and interpolates the format
* string with the proveded va_list args. The returned memory has to
* be freed by the caller. */
char*
gpi_vsnprintf (const char* format, va_list args);
/* Allocates a sufficiently large buffer and interpolates the format
* string with the proveded va_list args. The returned memory has to
* be freed by the caller. */
#ifdef __GNUC__
__attribute__((__format__(printf,1,0)))
#endif
char*
gpi_vsnprintf (const char* format, va_list args);
#ifdef __GNUC__
__attribute__((__format__(printf,1,2)))
#endif
static inline char*
aprintf(const char *fmt, ...)
{