1 #ifndef _NOWARN_SNPRINTF_H_
2 #define _NOWARN_SNPRINTF_H_
7 static inline int nowarn_snprintf(char *str, size_t size, const char *format,
13 va_start(args, format);
15 #pragma GCC diagnostic push "-Wformat-truncation"
16 #pragma GCC diagnostic ignored "-Wformat-truncation"
18 res = vsnprintf(str, size, format, args);
20 #pragma GCC diagnostic pop "-Wformat-truncation"