tuklib_mbstr_wrap: Silence a warning from Clang

Fixes: ca529c3f41
This commit is contained in:
Lasse Collin 2024-12-18 17:49:05 +02:00
parent 16c9796ef9
commit 5794cda064
No known key found for this signature in database
GPG Key ID: 38EE757D69184620
1 changed files with 9 additions and 0 deletions

View File

@ -254,7 +254,16 @@ tuklib_wrapf(FILE *stream, const struct tuklib_wrap_opt *opt,
#ifdef HAVE_VASPRINTF #ifdef HAVE_VASPRINTF
va_start(ap, fmt); va_start(ap, fmt);
#ifdef __clang__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
const int n = vasprintf(&buf, fmt, ap); const int n = vasprintf(&buf, fmt, ap);
#ifdef __clang__
# pragma GCC diagnostic pop
#endif
va_end(ap); va_end(ap);
if (n == -1) if (n == -1)
return TUKLIB_WRAP_ERR_FORMAT; return TUKLIB_WRAP_ERR_FORMAT;