From 5794cda064ce980450eaa5a4e2c71bd317168ce4 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 18 Dec 2024 17:49:05 +0200 Subject: [PATCH] tuklib_mbstr_wrap: Silence a warning from Clang Fixes: ca529c3f41a4a19a59e2e252e6dd9255f130c634 --- src/common/tuklib_mbstr_wrap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/tuklib_mbstr_wrap.c b/src/common/tuklib_mbstr_wrap.c index 4cc559d2..8d906e00 100644 --- a/src/common/tuklib_mbstr_wrap.c +++ b/src/common/tuklib_mbstr_wrap.c @@ -254,7 +254,16 @@ tuklib_wrapf(FILE *stream, const struct tuklib_wrap_opt *opt, #ifdef HAVE_VASPRINTF va_start(ap, fmt); + +#ifdef __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif const int n = vasprintf(&buf, fmt, ap); +#ifdef __clang__ +# pragma GCC diagnostic pop +#endif + va_end(ap); if (n == -1) return TUKLIB_WRAP_ERR_FORMAT;