Opened 9 days ago

#1865 new defect

error: cast between incompatible function types from 'FARPROC' on MinGW

Reported by: kenhys@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.17.x
Keywords: Cc:
uname -a: MINGW64_NT-10.0 2.11.1(0.329/5/3) x86_64
nginx -V: 1.17.3


Problem: bundles nginx to provide http server, it builds bundled nginx 1.17.3 with MinGW.

During executing recent CI, it reports error.


2019-10-07T01:05:15.7349316Z cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/d/a/groonga/groonga/include -I/d/a/groonga/groonga/include   -DNGX_HTTP_GROONGA_LOG_PATH=\""/mingw64/var/log/groonga/httpd/groonga.log"\" -DNGX_HTTP_GROONGA_QUERY_LOG_PATH=\""/mingw64/var/log/groonga/httpd/groonga-query.log"\" -I src/core -I src/event -I src/event/modules -I src/os/win32 -I objs \
2019-10-07T01:05:15.7361486Z    -o objs/src/os/win32/ngx_win32_init.o \
2019-10-07T01:05:15.7376066Z    src/os/win32/ngx_win32_init.c
error: cast between incompatible function types from 'FARPROC'

This error is similar to #1546, but occurred place is different.

2019-10-07T01:05:16.3986206Z src/os/win32/ngx_win32_init.c: In function 'ngx_os_init':
2019-10-07T01:05:16.4540987Z src/os/win32/ngx_win32_init.c:243:15: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int (*)(struct pollfd *, ULONG,  INT)' {aka 'int (*)(struct pollfd *, long unsigned int,  int)'} [-Werror=cast-function-type]
2019-10-07T01:05:16.4695725Z      WSAPoll = (ngx_wsapoll_pt) GetProcAddress(hmod, "WSAPoll");
2019-10-07T01:05:16.4715602Z                ^
2019-10-07T01:05:16.4717443Z cc1.exe: all warnings being treated as errors


build succeeds without error.

Addtional Information:

2019-10-07T00:48:02.4678733Z  + MINGW64_NT-10.0 2.11.1(0.329/5/3) x86_64
2019-10-07T00:48:02.5551913Z  + using GNU C compiler
2019-10-07T00:48:02.6050959Z  + gcc version: 8.2.0 (Rev1, Built by MSYS2 project) 
2019-10-07T00:48:02.7918999Z checking for gcc -pipe switch ... found
2019-10-07T00:48:02.8123895Z checking for MINGW64_NT-10.0 specific features
2019-10-07T00:48:03.1517890Z configuring additional modules

Attachments (1)

1_Build.txt.gz (66.2 KB) - added by kenhys@… 9 days ago.
CI build log (compressed)

Download all attachments as: .zip

Change History (1)

Changed 9 days ago by kenhys@…

CI build log (compressed)

Note: See TracTickets for help on using tickets.