Modern GCC and Clang warn for these casts, with warnings like these:

../secapi/_chsize_s.c:20:6: warning: cast from 'FARPROC' (aka 'long long 
(*)()') to 'errno_t ((*))(int, long long) __attribute__((cdecl))' (aka 'int 
(*)(int, lo
ng long)') converts to incompatible function type 
[-Wcast-function-type-mismatch]
   20 |         f = (errno_t __cdecl (*)(int, long long))
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   21 |             GetProcAddress (__mingw_get_msvcrt_handle (), "_chsize_s");
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 mingw-w64-crt/libsrc/wspiapi/WspiapiGetAddrInfo.c | 2 +-
 mingw-w64-crt/libsrc/wspiapi/WspiapiGetNameInfo.c | 2 +-
 mingw-w64-crt/misc/output_format.c                | 4 ++--
 mingw-w64-crt/secapi/_access_s.c                  | 1 +
 mingw-w64-crt/secapi/_cgets_s.c                   | 1 +
 mingw-w64-crt/secapi/_cgetws_s.c                  | 1 +
 mingw-w64-crt/secapi/_chsize_s.c                  | 1 +
 mingw-w64-crt/secapi/_controlfp_s.c               | 1 +
 mingw-w64-crt/secapi/_ctime32_s.c                 | 1 +
 mingw-w64-crt/secapi/_ctime64_s.c                 | 1 +
 mingw-w64-crt/secapi/_gmtime32_s.c                | 1 +
 mingw-w64-crt/secapi/_gmtime64_s.c                | 1 +
 mingw-w64-crt/secapi/_localtime32_s.c             | 1 +
 mingw-w64-crt/secapi/_localtime64_s.c             | 1 +
 mingw-w64-crt/secapi/_mktemp_s.c                  | 1 +
 mingw-w64-crt/secapi/_sopen_s.c                   | 1 +
 mingw-w64-crt/secapi/_strdate_s.c                 | 1 +
 mingw-w64-crt/secapi/_strtime_s.c                 | 1 +
 mingw-w64-crt/secapi/_umask_s.c                   | 1 +
 mingw-w64-crt/secapi/_vcprintf_s.c                | 1 +
 mingw-w64-crt/secapi/_vcprintf_s_l.c              | 1 +
 mingw-w64-crt/secapi/_vcwprintf_s.c               | 1 +
 mingw-w64-crt/secapi/_vcwprintf_s_l.c             | 1 +
 mingw-w64-crt/secapi/_waccess_s.c                 | 1 +
 mingw-w64-crt/secapi/_wasctime_s.c                | 1 +
 mingw-w64-crt/secapi/_wctime32_s.c                | 1 +
 mingw-w64-crt/secapi/_wctime64_s.c                | 1 +
 mingw-w64-crt/secapi/_wmktemp_s.c                 | 1 +
 mingw-w64-crt/secapi/_wstrdate_s.c                | 1 +
 mingw-w64-crt/secapi/_wstrtime_s.c                | 1 +
 mingw-w64-crt/secapi/asctime_s.c                  | 1 +
 mingw-w64-crt/secapi/memcpy_s.c                   | 1 +
 mingw-w64-crt/secapi/memmove_s.c                  | 1 +
 mingw-w64-crt/secapi/strerror_s.c                 | 1 +
 mingw-w64-crt/secapi/vsprintf_s.c                 | 1 +
 mingw-w64-crt/secapi/wmemcpy_s.c                  | 1 +
 mingw-w64-crt/secapi/wmemmove_s.c                 | 1 +
 37 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-crt/libsrc/wspiapi/WspiapiGetAddrInfo.c 
b/mingw-w64-crt/libsrc/wspiapi/WspiapiGetAddrInfo.c
index 445c42a47..ff2b771e9 100644
--- a/mingw-w64-crt/libsrc/wspiapi/WspiapiGetAddrInfo.c
+++ b/mingw-w64-crt/libsrc/wspiapi/WspiapiGetAddrInfo.c
@@ -14,7 +14,7 @@ WspiapiGetAddrInfo(const char *nodename, const char *servname,
   int err;
 
   if (!pfGetAddrInfo)
-    pfGetAddrInfo = (WSPIAPI_PGETADDRINFO) WspiapiLoad (0);
+    pfGetAddrInfo = (WSPIAPI_PGETADDRINFO) (void(*)(void)) WspiapiLoad (0);
   err = (*pfGetAddrInfo) (nodename, servname, hints, res);
   WSASetLastError (err);
   return err;
diff --git a/mingw-w64-crt/libsrc/wspiapi/WspiapiGetNameInfo.c 
b/mingw-w64-crt/libsrc/wspiapi/WspiapiGetNameInfo.c
index ab805956f..accbe9382 100644
--- a/mingw-w64-crt/libsrc/wspiapi/WspiapiGetNameInfo.c
+++ b/mingw-w64-crt/libsrc/wspiapi/WspiapiGetNameInfo.c
@@ -15,7 +15,7 @@ WspiapiGetNameInfo (const struct sockaddr *sa, socklen_t 
salen,
   int err;
 
   if (!pfGetNameInfo)
-    pfGetNameInfo = (WSPIAPI_PGETNAMEINFO) WspiapiLoad(1);
+    pfGetNameInfo = (WSPIAPI_PGETNAMEINFO) (void(*)(void)) WspiapiLoad(1);
   err = (*pfGetNameInfo) (sa, salen, host, hostlen, serv, servlen, flags);
   WSASetLastError (err);
   return err;
diff --git a/mingw-w64-crt/misc/output_format.c 
b/mingw-w64-crt/misc/output_format.c
index 5bb25cfe0..20315ba65 100644
--- a/mingw-w64-crt/misc/output_format.c
+++ b/mingw-w64-crt/misc/output_format.c
@@ -46,7 +46,7 @@ static unsigned int init_set_output_format(unsigned int 
format)
 {
   f_set_output_format sof;
 
-  sof = (f_set_output_format) GetProcAddress (__mingw_get_msvcrt_handle(), 
"_set_output_format");
+  sof = (f_set_output_format) (void(*)(void)) GetProcAddress 
(__mingw_get_msvcrt_handle(), "_set_output_format");
   if(!sof)
       sof = fake_set_output_format;
 
@@ -67,7 +67,7 @@ static unsigned int init_get_output_format(void)
 {
   f_get_output_format gof;
 
-  gof = (f_get_output_format) GetProcAddress (__mingw_get_msvcrt_handle(), 
"_get_output_format");
+  gof = (f_get_output_format) (void(*)(void)) GetProcAddress 
(__mingw_get_msvcrt_handle(), "_get_output_format");
   if(!gof)
       gof = fake_get_output_format;
 
diff --git a/mingw-w64-crt/secapi/_access_s.c b/mingw-w64-crt/secapi/_access_s.c
index 9be582e87..c1d4658f7 100644
--- a/mingw-w64-crt/secapi/_access_s.c
+++ b/mingw-w64-crt/secapi/_access_s.c
@@ -18,6 +18,7 @@ _stub (const char *s, int m)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(const char *, int))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_access_s");
        if (!f)
          f = _int_access_s;
diff --git a/mingw-w64-crt/secapi/_cgets_s.c b/mingw-w64-crt/secapi/_cgets_s.c
index f81623a9a..44ce2df3b 100644
--- a/mingw-w64-crt/secapi/_cgets_s.c
+++ b/mingw-w64-crt/secapi/_cgets_s.c
@@ -18,6 +18,7 @@ _stub (char *s, size_t l, size_t *r_len)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t, size_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_cgets_s");
        if (!f)
          f = _int_cgets_s;
diff --git a/mingw-w64-crt/secapi/_cgetws_s.c b/mingw-w64-crt/secapi/_cgetws_s.c
index 01ee3d1b3..867e314ce 100644
--- a/mingw-w64-crt/secapi/_cgetws_s.c
+++ b/mingw-w64-crt/secapi/_cgetws_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *s, size_t l, size_t *r_len)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t, size_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_cgetws_s");
        if (!f)
          f = _int_cgetws_s;
diff --git a/mingw-w64-crt/secapi/_chsize_s.c b/mingw-w64-crt/secapi/_chsize_s.c
index cd8d066eb..8a469a226 100644
--- a/mingw-w64-crt/secapi/_chsize_s.c
+++ b/mingw-w64-crt/secapi/_chsize_s.c
@@ -18,6 +18,7 @@ _stub (int fd, long long sz)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(int, long long))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_chsize_s");
        if (!f)
          f = _int_chsize_s;
diff --git a/mingw-w64-crt/secapi/_controlfp_s.c 
b/mingw-w64-crt/secapi/_controlfp_s.c
index 32be17cfb..642098721 100644
--- a/mingw-w64-crt/secapi/_controlfp_s.c
+++ b/mingw-w64-crt/secapi/_controlfp_s.c
@@ -46,6 +46,7 @@ static errno_t __cdecl _stub (
   if (f == _stub)
     {
         f = (errno_t __cdecl (*)(unsigned int *, unsigned int, unsigned int))
+            (void(*)(void))
             GetProcAddress (__mingw_get_msvcrt_handle (), "_controlfp_s");
         if (!f)
           f = _int_controlfp_s;
diff --git a/mingw-w64-crt/secapi/_ctime32_s.c 
b/mingw-w64-crt/secapi/_ctime32_s.c
index c59ccfc19..724716b6e 100644
--- a/mingw-w64-crt/secapi/_ctime32_s.c
+++ b/mingw-w64-crt/secapi/_ctime32_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn, const __time32_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t, const __time32_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_ctime32_s");
        if (!f)
          f = _int_ctime32_s;
diff --git a/mingw-w64-crt/secapi/_ctime64_s.c 
b/mingw-w64-crt/secapi/_ctime64_s.c
index 833d14a0a..8fc56bde2 100644
--- a/mingw-w64-crt/secapi/_ctime64_s.c
+++ b/mingw-w64-crt/secapi/_ctime64_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn, const __time64_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t, const __time64_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_ctime64_s");
        if (!f)
          f = _int_ctime64_s;
diff --git a/mingw-w64-crt/secapi/_gmtime32_s.c 
b/mingw-w64-crt/secapi/_gmtime32_s.c
index 7139c24df..2f85321b1 100644
--- a/mingw-w64-crt/secapi/_gmtime32_s.c
+++ b/mingw-w64-crt/secapi/_gmtime32_s.c
@@ -18,6 +18,7 @@ _stub (struct tm *ptm, const __time32_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(struct tm *, const __time32_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_gmtime32_s");
        if (!f)
          f = _int_gmtime32_s;
diff --git a/mingw-w64-crt/secapi/_gmtime64_s.c 
b/mingw-w64-crt/secapi/_gmtime64_s.c
index c4ca15468..18f920eb5 100644
--- a/mingw-w64-crt/secapi/_gmtime64_s.c
+++ b/mingw-w64-crt/secapi/_gmtime64_s.c
@@ -18,6 +18,7 @@ _stub (struct tm *ptm, const __time64_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(struct tm *, const __time64_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_gmtime64_s");
        if (!f)
          f = _int_gmtime64_s;
diff --git a/mingw-w64-crt/secapi/_localtime32_s.c 
b/mingw-w64-crt/secapi/_localtime32_s.c
index c8a62f6cc..783285f67 100644
--- a/mingw-w64-crt/secapi/_localtime32_s.c
+++ b/mingw-w64-crt/secapi/_localtime32_s.c
@@ -18,6 +18,7 @@ _stub (struct tm *ptm, const __time32_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(struct tm *, const __time32_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_localtime32_s");
        if (!f)
          f = _int_localtime32_s;
diff --git a/mingw-w64-crt/secapi/_localtime64_s.c 
b/mingw-w64-crt/secapi/_localtime64_s.c
index bff0868ba..8b37db2d8 100644
--- a/mingw-w64-crt/secapi/_localtime64_s.c
+++ b/mingw-w64-crt/secapi/_localtime64_s.c
@@ -18,6 +18,7 @@ _stub (struct tm *ptm, const __time64_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(struct tm *, const __time64_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_localtime64_s");
        if (!f)
          f = _int_localtime64_s;
diff --git a/mingw-w64-crt/secapi/_mktemp_s.c b/mingw-w64-crt/secapi/_mktemp_s.c
index 01484d938..b87b96280 100644
--- a/mingw-w64-crt/secapi/_mktemp_s.c
+++ b/mingw-w64-crt/secapi/_mktemp_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_mktemp_s");
        if (!f)
          f = _int_mktemp_s;
diff --git a/mingw-w64-crt/secapi/_sopen_s.c b/mingw-w64-crt/secapi/_sopen_s.c
index b4f8f6af5..58f0c9f9d 100644
--- a/mingw-w64-crt/secapi/_sopen_s.c
+++ b/mingw-w64-crt/secapi/_sopen_s.c
@@ -15,6 +15,7 @@ _stub (int* pfh, const char *filename, int oflag, int shflag, 
int pmode)
 
     if (f == _stub) {
         f = (errno_t __cdecl (*)(int *, const char *, int, int, int))
+            (void(*)(void))
             GetProcAddress (__mingw_get_msvcrt_handle (), "_sopen_s");
         if (f == NULL)
             f = _int_sopen_s;
diff --git a/mingw-w64-crt/secapi/_strdate_s.c 
b/mingw-w64-crt/secapi/_strdate_s.c
index b62dec752..550267788 100644
--- a/mingw-w64-crt/secapi/_strdate_s.c
+++ b/mingw-w64-crt/secapi/_strdate_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_strdate_s");
        if (!f)
          f = _int_strdate_s;
diff --git a/mingw-w64-crt/secapi/_strtime_s.c 
b/mingw-w64-crt/secapi/_strtime_s.c
index b66e3f95a..2bebd4001 100644
--- a/mingw-w64-crt/secapi/_strtime_s.c
+++ b/mingw-w64-crt/secapi/_strtime_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_strtime_s");
        if (!f)
          f = _int_strtime_s;
diff --git a/mingw-w64-crt/secapi/_umask_s.c b/mingw-w64-crt/secapi/_umask_s.c
index 75e8ddbb4..5c4888515 100644
--- a/mingw-w64-crt/secapi/_umask_s.c
+++ b/mingw-w64-crt/secapi/_umask_s.c
@@ -18,6 +18,7 @@ _stub (int m, int *pold)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(int, int *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_umask_s");
        if (!f)
          f = _int_umask_s;
diff --git a/mingw-w64-crt/secapi/_vcprintf_s.c 
b/mingw-w64-crt/secapi/_vcprintf_s.c
index 91f143f1f..b11f8adfd 100644
--- a/mingw-w64-crt/secapi/_vcprintf_s.c
+++ b/mingw-w64-crt/secapi/_vcprintf_s.c
@@ -18,6 +18,7 @@ _stub (const char *s, va_list argp)
   if (f == _stub)
     {
        f = (int __cdecl (*)(const char *, va_list))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_vcprintf_s");
        if (!f)
          f = _int_vcprintf_s;
diff --git a/mingw-w64-crt/secapi/_vcprintf_s_l.c 
b/mingw-w64-crt/secapi/_vcprintf_s_l.c
index 787c76be4..5a9eb9d2a 100644
--- a/mingw-w64-crt/secapi/_vcprintf_s_l.c
+++ b/mingw-w64-crt/secapi/_vcprintf_s_l.c
@@ -18,6 +18,7 @@ _stub (const char *s, _locale_t loc, va_list argp)
   if (f == _stub)
     {
        f = (int __cdecl (*)(const char *, _locale_t, va_list))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_vcprintf_s_l");
        if (!f)
          f = _int_vcprintf_s_l;
diff --git a/mingw-w64-crt/secapi/_vcwprintf_s.c 
b/mingw-w64-crt/secapi/_vcwprintf_s.c
index 325e86619..dbc8e6a8f 100644
--- a/mingw-w64-crt/secapi/_vcwprintf_s.c
+++ b/mingw-w64-crt/secapi/_vcwprintf_s.c
@@ -18,6 +18,7 @@ _stub (const wchar_t *s, va_list argp)
   if (f == _stub)
     {
        f = (int __cdecl (*)(const wchar_t *, va_list))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_vcwprintf_s");
        if (!f)
          f = _int_vcwprintf_s;
diff --git a/mingw-w64-crt/secapi/_vcwprintf_s_l.c 
b/mingw-w64-crt/secapi/_vcwprintf_s_l.c
index 4d112a1c5..aa75cdf04 100644
--- a/mingw-w64-crt/secapi/_vcwprintf_s_l.c
+++ b/mingw-w64-crt/secapi/_vcwprintf_s_l.c
@@ -18,6 +18,7 @@ _stub (const wchar_t *s, _locale_t loc, va_list argp)
   if (f == _stub)
     {
        f = (int __cdecl (*)(const wchar_t *, _locale_t, va_list))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_vcwprintf_s_l");
        if (!f)
          f = _int_vcwprintf_s_l;
diff --git a/mingw-w64-crt/secapi/_waccess_s.c 
b/mingw-w64-crt/secapi/_waccess_s.c
index c4825cff4..dd55edc02 100644
--- a/mingw-w64-crt/secapi/_waccess_s.c
+++ b/mingw-w64-crt/secapi/_waccess_s.c
@@ -18,6 +18,7 @@ _stub (const wchar_t *s, int m)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(const wchar_t *, int))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_waccess_s");
        if (!f)
          f = _int_waccess_s;
diff --git a/mingw-w64-crt/secapi/_wasctime_s.c 
b/mingw-w64-crt/secapi/_wasctime_s.c
index 6b414ee9d..4b6173748 100644
--- a/mingw-w64-crt/secapi/_wasctime_s.c
+++ b/mingw-w64-crt/secapi/_wasctime_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn, const struct tm *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t, const struct tm *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wasctime_s");
        if (!f)
          f = _int_wasctime_s;
diff --git a/mingw-w64-crt/secapi/_wctime32_s.c 
b/mingw-w64-crt/secapi/_wctime32_s.c
index 27c414b16..02bf4dbca 100644
--- a/mingw-w64-crt/secapi/_wctime32_s.c
+++ b/mingw-w64-crt/secapi/_wctime32_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn, const __time32_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t, const __time32_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wctime32_s");
        if (!f)
          f = _int_wctime32_s;
diff --git a/mingw-w64-crt/secapi/_wctime64_s.c 
b/mingw-w64-crt/secapi/_wctime64_s.c
index bce40fd22..a1016f90e 100644
--- a/mingw-w64-crt/secapi/_wctime64_s.c
+++ b/mingw-w64-crt/secapi/_wctime64_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn, const __time64_t *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t, const __time64_t *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wctime64_s");
        if (!f)
          f = _int_wctime64_s;
diff --git a/mingw-w64-crt/secapi/_wmktemp_s.c 
b/mingw-w64-crt/secapi/_wmktemp_s.c
index e13abc790..3ae529f13 100644
--- a/mingw-w64-crt/secapi/_wmktemp_s.c
+++ b/mingw-w64-crt/secapi/_wmktemp_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wmktemp_s");
        if (!f)
          f = _int_wmktemp_s;
diff --git a/mingw-w64-crt/secapi/_wstrdate_s.c 
b/mingw-w64-crt/secapi/_wstrdate_s.c
index e8ec1d446..a26e026e7 100644
--- a/mingw-w64-crt/secapi/_wstrdate_s.c
+++ b/mingw-w64-crt/secapi/_wstrdate_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wstrdate_s");
        if (!f)
          f = _int_wstrdate_s;
diff --git a/mingw-w64-crt/secapi/_wstrtime_s.c 
b/mingw-w64-crt/secapi/_wstrtime_s.c
index ffb8a3e96..3669c0d36 100644
--- a/mingw-w64-crt/secapi/_wstrtime_s.c
+++ b/mingw-w64-crt/secapi/_wstrtime_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "_wstrtime_s");
        if (!f)
          f = _int_wstrtime_s;
diff --git a/mingw-w64-crt/secapi/asctime_s.c b/mingw-w64-crt/secapi/asctime_s.c
index aeb16e3bc..2066fa70e 100644
--- a/mingw-w64-crt/secapi/asctime_s.c
+++ b/mingw-w64-crt/secapi/asctime_s.c
@@ -18,6 +18,7 @@ _stub (char *d, size_t dn, const struct tm *pt)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(char *, size_t, const struct tm *))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "asctime_s");
        if (!f)
          f = _int_asctime_s;
diff --git a/mingw-w64-crt/secapi/memcpy_s.c b/mingw-w64-crt/secapi/memcpy_s.c
index 013eff05c..b60bc717c 100644
--- a/mingw-w64-crt/secapi/memcpy_s.c
+++ b/mingw-w64-crt/secapi/memcpy_s.c
@@ -17,6 +17,7 @@ _stub (void *d, size_t dn, const void *s, size_t n)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(void *, size_t, const void *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "memcpy_s");
        if (!f)
          f = _int_memcpy_s;
diff --git a/mingw-w64-crt/secapi/memmove_s.c b/mingw-w64-crt/secapi/memmove_s.c
index dca1dbe57..977d18667 100644
--- a/mingw-w64-crt/secapi/memmove_s.c
+++ b/mingw-w64-crt/secapi/memmove_s.c
@@ -17,6 +17,7 @@ _stub (void *d, size_t dn, const void *s, size_t n)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(void *, size_t, const void *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "memmove_s");
        if (!f)
          f = _int_memmove_s;
diff --git a/mingw-w64-crt/secapi/strerror_s.c 
b/mingw-w64-crt/secapi/strerror_s.c
index 1216c4131..a6d1f1631 100644
--- a/mingw-w64-crt/secapi/strerror_s.c
+++ b/mingw-w64-crt/secapi/strerror_s.c
@@ -17,6 +17,7 @@ _stub (char *buffer, size_t numberOfElements, int errnum)
   if (f == _stub)
     {
       f = (errno_t __cdecl (*)(char *, size_t, int))
+            (void(*)(void))
             GetProcAddress (__mingw_get_msvcrt_handle (), "strerror_s");
       if (!f)
       {
diff --git a/mingw-w64-crt/secapi/vsprintf_s.c 
b/mingw-w64-crt/secapi/vsprintf_s.c
index 45dfb14b1..d3dead5f1 100644
--- a/mingw-w64-crt/secapi/vsprintf_s.c
+++ b/mingw-w64-crt/secapi/vsprintf_s.c
@@ -19,6 +19,7 @@ _stub (char *_DstBuf, size_t _Size, const char *_Format, 
va_list _ArgList)
   if (f == _stub)
     {
        f = (int __cdecl (*)(char *, size_t, const char *, va_list))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "vsprintf_s");
        if (!f)
          f = _int_vsprintf_s;
diff --git a/mingw-w64-crt/secapi/wmemcpy_s.c b/mingw-w64-crt/secapi/wmemcpy_s.c
index 83879246e..ada946da4 100644
--- a/mingw-w64-crt/secapi/wmemcpy_s.c
+++ b/mingw-w64-crt/secapi/wmemcpy_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn, const wchar_t *s, size_t n)
   if (f == _stub)
     {
        f = (errno_t __cdecl (*)(wchar_t *, size_t, const wchar_t *, size_t))
+           (void(*)(void))
            GetProcAddress (__mingw_get_msvcrt_handle (), "wmemcpy_s");
        if (!f)
          f = _int_wmemcpy_s;
diff --git a/mingw-w64-crt/secapi/wmemmove_s.c 
b/mingw-w64-crt/secapi/wmemmove_s.c
index 2e0d572ef..92d9119fa 100644
--- a/mingw-w64-crt/secapi/wmemmove_s.c
+++ b/mingw-w64-crt/secapi/wmemmove_s.c
@@ -18,6 +18,7 @@ _stub (wchar_t *d, size_t dn, const wchar_t *s, size_t n)
   if (f == _stub)
     {
  f = (errno_t __cdecl (*)(wchar_t *, size_t, const wchar_t *, size_t))
+    (void(*)(void))
     GetProcAddress (__mingw_get_msvcrt_handle (), "wmemmove_s");
  if (!f)
   f = _int_wmemmove_s;
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to