comparison src/os/win32/ngx_win32_init.c @ 7586:4f6e315eef15

Win32: silenced -Wcast-function-type GCC warning (ticket #1865). With MinGW-w64, building 64-bit nginx binary with GCC 8 and above results in warning due to cast of GetProcAddress() result to ngx_wsapoll_pt, which GCC thinks is incorrect. Added intermediate cast to "void *" to silence the warning.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 21 Oct 2019 19:07:03 +0300
parents 4089b3d2cb59
children d1079d6b2f19
comparison
equal deleted inserted replaced
7585:746567d633ac 7586:4f6e315eef15
238 ngx_log_error(NGX_LOG_NOTICE, log, ngx_errno, 238 ngx_log_error(NGX_LOG_NOTICE, log, ngx_errno,
239 "GetModuleHandle(\"ws2_32.dll\") failed"); 239 "GetModuleHandle(\"ws2_32.dll\") failed");
240 goto nopoll; 240 goto nopoll;
241 } 241 }
242 242
243 WSAPoll = (ngx_wsapoll_pt) GetProcAddress(hmod, "WSAPoll"); 243 WSAPoll = (ngx_wsapoll_pt) (void *) GetProcAddress(hmod, "WSAPoll");
244 if (WSAPoll == NULL) { 244 if (WSAPoll == NULL) {
245 ngx_log_error(NGX_LOG_NOTICE, log, ngx_errno, 245 ngx_log_error(NGX_LOG_NOTICE, log, ngx_errno,
246 "GetProcAddress(\"WSAPoll\") failed"); 246 "GetProcAddress(\"WSAPoll\") failed");
247 goto nopoll; 247 goto nopoll;
248 } 248 }