From e6bb91212be93b0b7e4c99c1409f91dd8e211688 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 3 Dec 2023 12:51:24 -0800 Subject: fix printf format for MinGW (#942) With gcc, mingw uses gnu_printf. With clang, printf is used as it does not support gnu_printf. Use the internal header to match this properly. Signed-off-by: Rosen Penev --- core/ambdec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/ambdec.cpp') diff --git a/core/ambdec.cpp b/core/ambdec.cpp index f98e1098..fb747fdf 100644 --- a/core/ambdec.cpp +++ b/core/ambdec.cpp @@ -42,8 +42,8 @@ enum class ReaderScope { HFMatrix, }; -#ifdef __USE_MINGW_ANSI_STDIO -[[gnu::format(gnu_printf,2,3)]] +#ifdef __MINGW32__ +[[gnu::format(__MINGW_PRINTF_FORMAT,2,3)]] #else [[gnu::format(printf,2,3)]] #endif -- cgit v1.2.3