Ignore format nonliteral in tutils.h

This commit is contained in:
Jonas Kvinge 2020-07-17 16:34:37 +02:00
parent 1819f64467
commit 1c70e3be25
1 changed files with 5 additions and 0 deletions

View File

@ -160,6 +160,9 @@ inline String formatString(const char *format, ...) {
char buf[BufferSize];
int length;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
# if defined(HAVE_VSNPRINTF)
length = vsnprintf(buf, BufferSize, format, args);
@ -180,6 +183,8 @@ inline String formatString(const char *format, ...) {
# endif
#pragma GCC diagnostic pop
va_end(args);
if (length > 0)