[PATCH] Fix wrong type cast in ngx_iocp_module.c

Kouhei Sutou kou at cozmixng.org
Sat Oct 11 12:02:28 UTC 2014


Hi,

The attached patch fix the following warning:

  x86_64-w64-mingw32-gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/win32 -I objs \
          -o objs/src/event/modules/ngx_iocp_module.o \
          src/event/modules/ngx_iocp_module.c
  src/event/modules/ngx_iocp_module.c: In function 'ngx_iocp_process_events':
  src/event/modules/ngx_iocp_module.c:250:10: error: passing argument 3 of 'GetQueuedCompletionStatus' from incompatible pointer type [-Werror]
       rc = GetQueuedCompletionStatus(iocp, &bytes, (LPDWORD) &key,
            ^
  In file included from /usr/share/mingw-w64/include/winbase.h:21:0,
                   from /usr/share/mingw-w64/include/windows.h:70,
                   from src/os/win32/ngx_win32_config.h:28,
                   from src/core/ngx_config.h:38,
                   from src/event/modules/ngx_iocp_module.c:8:
  /usr/share/mingw-w64/include/ioapiset.h:20:29: note: expected 'PULONG_PTR' but argument is of type 'DWORD *'
     WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatus (HANDLE CompletionPort, LPDWORD lpNumberOfBytesTransferred, PULONG_PTR lpCompletionKey, LPOVERLAPPED *lpOverlapped, DWORD dwMilliseconds);
                               ^
  cc1: all warnings being treated as errors


This patch is separated from
http://mailman.nginx.org/pipermail/nginx-devel/2014-October/006028.html

It is suggested at
http://mailman.nginx.org/pipermail/nginx-devel/2014-October/006054.html



Thanks,
--
kou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngx-iocp-module-fix-wrong-type-cast.patch
Type: text/x-patch
Size: 1473 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20141011/497d9ab3/attachment.bin>


More information about the nginx-devel mailing list