1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
.\winsock2.c: In function 'main':
.\winsock2.c:38:15: warning: passing argument 1 of 'free' makes pointer from integer without a cast [-Wint-conversion]
38 | free(adapter_size);
| ^~~~~~~~~~~~
| |
| DWORD {aka long unsigned int}
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/mm_malloc.h:27,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/xmmintrin.h:34,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/immintrin.h:29,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/x86intrin.h:32,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:1555,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:9,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/WinSock2.h:23,
from .\winsock2.c:5:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h:530:27: note: expected 'void *' but argument is of type 'DWORD' {aka 'long unsigned int'}
530 | void __cdecl free(void *_Memory);
| ~~~~~~^~~~~~~
.\winsock2.c:45:15: warning: passing argument 1 of 'free' makes pointer from integer without a cast [-Wint-conversion]
45 | free(adapter_size);
| ^~~~~~~~~~~~
| |
| DWORD {aka long unsigned int}
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/mm_malloc.h:27,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/xmmintrin.h:34,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/immintrin.h:29,
from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/include/x86intrin.h:32,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:1555,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:9,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/WinSock2.h:23,
from .\winsock2.c:5:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h:530:27: note: expected 'void *' but argument is of type 'DWORD' {aka 'long unsigned int'}
530 | void __cdecl free(void *_Memory);
| ~~~~~~^~~~~~~
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\mksh\AppData\Local\Temp\ccfa6YAH.o:winsock2.c:(.text+0x105): undefined reference to `GetAdaptersAddresses'
collect2.exe: error: ld returned 1 exit status
|