From 7c93d9aacb5987c3ada52f7f68c6f38594e08612 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 9 Dec 2020 16:12:03 -0700 Subject: [PATCH] mingw-w64: patch to silence implicit-function-declaration warnings Closes #7356 I did this as a patch to the source rather than passing flags so that it would intentionally be reverted when we update to the next release of mingw-w64. At this time if any warnings are still emitted we should find out why and make sure upstream is aware of the problem. --- lib/libc/mingw/secapi/vsprintf_s.c | 5 +++++ lib/libc/mingw/stdio/vwscanf.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/libc/mingw/secapi/vsprintf_s.c b/lib/libc/mingw/secapi/vsprintf_s.c index 45dfb14b11..fd0c4ef13b 100644 --- a/lib/libc/mingw/secapi/vsprintf_s.c +++ b/lib/libc/mingw/secapi/vsprintf_s.c @@ -33,8 +33,13 @@ vsprintf_s (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) return _stub (_DstBuf, _Size, _Format, _ArgList); } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-function-declaration" + static int __cdecl _int_vsprintf_s (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) { return __ms_vsnprintf (_DstBuf, _Size, _Format, _ArgList); } + +#pragma clang diagnostic pop diff --git a/lib/libc/mingw/stdio/vwscanf.c b/lib/libc/mingw/stdio/vwscanf.c index 3360eefad1..8310498ffd 100644 --- a/lib/libc/mingw/stdio/vwscanf.c +++ b/lib/libc/mingw/stdio/vwscanf.c @@ -10,7 +10,12 @@ #include #include +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-function-declaration" + int __ms_vwscanf (const wchar_t * __restrict__ format, va_list arg) { return __ms_vfwscanf(stdin, format, arg); } + +#pragma clang diagnostic pop