cl
cl copied to clipboard
Warnings when building it in Mingw64+Intel SDK 2017R2
I noticed the project was compiled and the .beam and .dll files generated, but there were warnings that seems to be relevant:
micheus@/F/unixlike/src/cl (master)[64b]
$ CC=gcc ../rebar3/rebar3 compile
===> Verifying dependencies...
===> Compiling cl
make: Entering directory 'f:/unixlike/src/cl/c_src'
make nif TYPE=release
make[1]: Entering directory 'f:/unixlike/src/cl/c_src'
gcc -c -o cl_nif.o -Wall -Wextra -Wswitch-default -Wswitch-enum -D_THREAD_SAFE -D_REENTRANT -fno-common -Wno-deprecated-declarations -Wno-missing-field-initializers -I"f:/Program Files/erl9.3/usr/include" -D__WIN32__ -shared -IF:/unixlike/mingw64/include -m64 -DWIN32 -O3 cl_nif.c
cl_nif.c: In function 'ecl_get_kernel_arg_info':
cl_nif.c:5225:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void*) (unsigned long) arg_index,
^
cl_nif.c: In function 'dlopen':
cl_nif.c:7353:37: warning: unused parameter 'unused' [-Wunused-parameter]
HMODULE dlopen(const CHAR *DLL, int unused) {
^
gcc -c -o cl_hash.o -Wall -Wextra -Wswitch-default -Wswitch-enum -D_THREAD_SAFE -D_REENTRANT -fno-common -Wno-deprecated-declarations -Wno-missing-field-initializers -I"f:/Program Files/erl9.3/usr/include" -D__WIN32__ -shared -IF:/unixlike/mingw64/include -m64 -DWIN32 -O3 cl_hash.c
gcc -shared -o ../priv/cl_nif.dll cl_nif.o cl_hash.o -LF:/unixlike/mingw64/lib/x64 -lOpenCL
make[1]: Leaving directory 'f:/unixlike/src/cl/c_src'
make: Leaving directory 'f:/unixlike/src/cl/c_src'
ok
My dev environment:
- MingW64;
- Erlang V9.3 (20);
- Rebar3;
- Intel SDK 2017 R2 (mingw64\lib\OpenCL.lib <= sdk\lib\x64\OpenCL.lib and mingw64\include*.* <= sdk\include*.*);
- Windows 7 x64.