在 2024-07-29 02:58, Pali Rohár 写道:
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 } } ^
These can be silenced by casting the pointer to an `INT_PTR` or `intptr_t` in between. Granted, I think this had better be special-case'd in GCC. Maybe it's just too late?
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
These have been moved from 'd2derror.h' to 'winerror.h' since Windows 8.0 SDK. I suggest we do the same.
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,
This function should not return void.
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];
Not sure about this one.
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);
These can be replaced with `abort()`.
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)
`imaxdiv_t` doesn't have to be a distinct type. It can be just typedef lldiv_t imaxdiv_t;
stdio/_scprintf.c:32:20: warning: ‘init_scprintf’ used but never defined static int __cdecl init_scprintf(const char * __restrict__ format, ...);
`static` can be removed as it has no effect. The linkage is specified in assembly. For GNU as, symbols are internal by default, and external if declared in `.globl`.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public