Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning with MinGW-W64 GCC-8.1.0 #63

Closed
ChessMan3 opened this issue May 24, 2018 · 2 comments
Closed

Warning with MinGW-W64 GCC-8.1.0 #63

ChessMan3 opened this issue May 24, 2018 · 2 comments

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@ChessMan3
Copy link

@ChessMan3 ChessMan3 commented May 24, 2018

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 ChessMan3 changed the title Warning with MinGW 8.1.0 Warning with MinGW-W64 GCC-8.1.0 May 24, 2018
@syzygy1 syzygy1 closed this in d5dce85 May 24, 2018
@ChessMan3
Copy link
Author

@ChessMan3 ChessMan3 commented May 24, 2018

@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

@syzygy1 syzygy1 reopened this May 24, 2018
syzygy1 added a commit that referenced this issue May 24, 2018
This should fix another warning reported in #63
@ChessMan3
Copy link
Author

@ChessMan3 ChessMan3 commented May 25, 2018

All warnings are now fixed. Thank you.

@ChessMan3 ChessMan3 closed this May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment