syzygy1 / Cfish

C port of Stockfish
GNU General Public License v3.0
137 stars 58 forks source link

Warning with MinGW-W64 GCC-8.1.0 #63

Closed ChessMan3 closed 6 years ago

ChessMan3 commented 6 years ago

gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -Wno-pedantic-ms-format -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o ucioption.o ucioption.c thread.c: In function 'thread_create': thread.c:146:42: warning: cast between incompatible function types from 'void ()(void )' to 'DWORD ()(void )' {aka 'long unsigned int ()(void )'} [-Wcast-function-type] HANDLE thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread_init, (void *)(intptr_t)idx, 0 , NULL); ^ gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -Wno-pedantic-ms-format -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o numa.o numa.c

ChessMan3 commented 6 years ago

@syzygy1

With numa=yes:

gcc -Wall -std=c11 -fprofile-use -fno-peel-loops -fno-tracer -pedantic -Wextra -Wshadow -Wno-pedantic-ms-format -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DNUMA -flto -c -o polybook.o polybook.c numa.c: In function 'numa_init': numa.c:202:17: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int ()()'} to 'BOOL ()(LOGICAL_PROCESSOR_RELATIONSHIP, struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX , DWORD )' {aka 'int ()(enum _LOGICAL_PROCESSOR_RELATIONSHIP, struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX , long unsigned int )'} [-Wcast-function-type] (GLPIEX)GetProcAddress(GetModuleHandle("kernel32.dll"), ^ numa.c:205:17: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int ()()'} to 'BOOL ()(void , const GROUP_AFFINITY , struct _GROUP_AFFINITY )' {aka 'int ()(void , const struct _GROUP_AFFINITY , struct _GROUP_AFFINITY )'} [-Wcast-function-type] (STGA)GetProcAddress(GetModuleHandle("kernel32.dll"), ^ numa.c:209:17: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int ()()'} to 'void ()(void , void , SIZE_T, DWORD, DWORD, DWORD)' {aka 'void ()(void , void *, long long unsigned int, long unsigned int, long unsigned int, long unsigned int)'} [-Wcast-function-type] (VAEN)GetProcAddress(GetModuleHandle("kernel32.dll"), ^ gcc -o cfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o numa.o settings.o polybook.o -lgcov -lm -m64 -Wl,--no-as-needed -lpthread -Wall -std=c11 -fprofile-use -fno-peel-loops -fno-tracer -pedantic -Wextra -Wshadow -Wno-pedantic-ms-format -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DNUMA -flto

ChessMan3 commented 6 years ago

All warnings are now fixed. Thank you.