There are also other warnings which are not fixes by these my patches.
List of the reaming warnings is below. If you have a time try to look
at them. I'm really not sure how to fix them. In my opinion gets and
init_scprintf warnings are false-positive these could be just muted by
some gcc pragma.


In file included from libsrc/wspiapi/WspiapiLoad.c:7:
libsrc/wspiapi/WspiapiLoad.c: In function ‘WspiapiLoad’:
mingw-w64-headers/include/wspiapi.h:50:20: warning: cast between incompatible 
function types from ‘void (__attribute__((stdcall)) *)(struct addrinfo *)’ to 
‘int (__attribute__((stdcall)) *)()’ [-Wcast-function-type]
   { "freeaddrinfo",(FARPROC) WspiapiLegacyFreeAddrInfo } }
                    ^
libsrc/wspiapi/WspiapiLoad.c:13:41: note: in expansion of macro 
‘WSPIAPI_FUNCTION_ARRAY’
   static WSPIAPI_FUNCTION rgtGlobal[] = WSPIAPI_FUNCTION_ARRAY;
                                         ^~~~~~~~~~~~~~~~~~~~~~
mingw-w64-headers/include/wspiapi.h:50:20: warning: cast between incompatible 
function types from ‘void (__attribute__((stdcall)) *)(struct addrinfo *)’ to 
‘int (__attribute__((stdcall)) *)()’ [-Wcast-function-type]
   { "freeaddrinfo",(FARPROC) WspiapiLegacyFreeAddrInfo } }
                    ^
libsrc/wspiapi/WspiapiLoad.c:16:33: note: in expansion of macro 
‘WSPIAPI_FUNCTION_ARRAY’
   WSPIAPI_FUNCTION rgtLocal[] = WSPIAPI_FUNCTION_ARRAY;
                                 ^~~~~~~~~~~~~~~~~~~~~~

libsrc/wspiapi/WspiapiFreeAddrInfo.c: In function ‘WspiapiFreeAddrInfo’:
libsrc/wspiapi/WspiapiFreeAddrInfo.c:15:22: warning: cast between incompatible 
function types from ‘FARPROC’ to ‘void (__attribute__((stdcall)) *)(struct 
addrinfo *)’ [-Wcast-function-type]
     pfFreeAddrInfo = (WSPIAPI_PFREEADDRINFO) WspiapiLoad(2);
                      ^

In file included from mingw-w64-headers/include/d2d1.h:20,
                 from mingw-w64-headers/include/d2d1_1.h:10,
                 from libsrc/uuid.c:29:
mingw-w64-headers/include/d2derr.h:16: warning: "D2DERR_BAD_NUMBER" redefined
 #define D2DERR_BAD_NUMBER 0x88990011
 
In file included from mingw-w64-headers/include/winbase.h:2816,
                 from mingw-w64-headers/include/windows.h:70,
                 from mingw-w64-headers/include/rpc.h:16,
                 from mingw-w64-headers/include/credentialprovider.h:7,
                 from libsrc/uuid.c:17:
mingw-w64-headers/include/winerror.h:4713: note: this is the location of the 
previous definition
 #define D2DERR_BAD_NUMBER                            
_HRESULT_TYPEDEF_(0x88990011)
 
(and same warning for all other D2DERR_* constants)

profile/profil.c: In function ‘profile_on’:
profile/profil.c:140:36: warning: cast between incompatible function types from 
‘void (__attribute__((stdcall)) *)(void *)’ to ‘DWORD (__attribute__((stdcall)) 
*)(void *)’ [-Wcast-function-type]
   p->profthr = CreateThread (0, 0, (DWORD (WINAPI *)(LPVOID)) profthr_func,
                                    ^
crt/tlssup.c:104:53: warning: cast between incompatible function types from 
‘BOOL (__attribute__((stdcall)) *)(void *, DWORD,  void *)’ to ‘void 
(__attribute__((stdcall)) *)(void *, DWORD,  void *)’ [-Wcast-function-type]
 const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback = (const 
PIMAGE_TLS_CALLBACK) __dyn_tls_init;
                                                     ^
crt/tlssup.c:105:52: warning: cast between incompatible function types from 
‘BOOL (__attribute__((stdcall)) *)(void *, DWORD,  void *)’ to ‘void 
(__attribute__((stdcall)) *)(void *, DWORD,  void *)’ [-Wcast-function-type]
 _CRTALLOC(".CRT$XLC") PIMAGE_TLS_CALLBACK __xl_c = (PIMAGE_TLS_CALLBACK) 
__dyn_tls_init;
                                                    ^
crt/tlssup.c:171:52: warning: cast between incompatible function types from 
‘BOOL (__attribute__((stdcall)) *)(void *, DWORD,  void *)’ to ‘void 
(__attribute__((stdcall)) *)(void *, DWORD,  void *)’ [-Wcast-function-type]
 _CRTALLOC(".CRT$XLD") PIMAGE_TLS_CALLBACK __xl_d = (PIMAGE_TLS_CALLBACK) 
__dyn_tls_dtor;
                                                    ^
gdtoa/dtoa.c: In function ‘__dtoa’:
gdtoa/dtoa.c:369:28: warning: ‘j2’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
     dval(&eps1) *= tens[j2 & 0xf];
                         ~~~^~~~~

ssp/gets_chk.c: In function ‘__gets_chk’:
ssp/gets_chk.c:20:12: warning: call to ‘gets’ declared with attribute warning: 
Using gets() is always unsafe - use fgets() instead
     return gets(dst);
            ^~~~~~~~~
ssp/gets_chk.c:24:12: warning: call to ‘gets’ declared with attribute warning: 
Using gets() is always unsafe - use fgets() instead
     return gets(dst);
            ^~~~~~~~~

misc/imaxdiv.c:34:1: warning: ‘lldiv’ alias between functions of incompatible 
types ‘lldiv_t(long long int,  long long int)’ {aka ‘struct <anonymous>(long 
long int,  long long int)’} and ‘imaxdiv_t(intmax_t,  intmax_t)’ {aka ‘struct 
<anonymous>(long long int,  long long int)’} [-Wattribute-alias]
 lldiv (long long, long long);
 ^~~~~
misc/imaxdiv.c:23:1: note: aliased declaration here
 imaxdiv(intmax_t numer, intmax_t denom)
 ^~~~~~~

stdio/_scprintf.c:32:20: warning: ‘init_scprintf’ used but never defined
 static int __cdecl init_scprintf(const char * __restrict__ format, ...);
                    ^~~~~~~~~~~~~


Pali Rohár (4):
  headers: Fix compile warning: FACILITY_VISUALCPP redefined
  headers: Fix compile warning: FACILITY_USERMODE_FILTER_MANAGER
    redefined
  headers: Fix compile warning: EnumResourceNames redefined
  headers: Fix compile warning: FindResource redefined

 mingw-w64-headers/include/delayimp.h    | 2 ++
 mingw-w64-headers/include/fltwinerror.h | 2 ++
 mingw-w64-headers/include/winbase.h     | 5 ++---
 3 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.20.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