Hi,
The attached patch fixes 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/core/ngx_connection.o \
src/core/ngx_connection.c
src/core/ngx_connection.c: In function 'ngx_close_idle_connections':
src/core/ngx_connection.c:1178:21: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]
if (c[i].fd != -1 && c[i].idle) {
^
cc1: all warnings being treated as errors
Thanks,
--
kou
# HG changeset patch
# User Kouhei Sutou <[email protected]>
# Date 1445085662 -32400
# Sat Oct 17 21:41:02 2015 +0900
# Node ID a1e6710e934117a4a7dc7b1720f441207550d665
# Parent 2f34ea503ac4e015cc08f6efbb279b360eda609c
Win32: make buildable with MinGW-w64 gcc.
This change fix the following worning:
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/core/ngx_connection.o \
src/core/ngx_connection.c
src/core/ngx_connection.c: In function 'ngx_close_idle_connections':
src/core/ngx_connection.c:1178:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c[i].fd != -1 && c[i].idle) {
^
cc1: all warnings being treated as errors
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -1170,17 +1170,17 @@ ngx_close_idle_connections(ngx_cycle_t *
ngx_connection_t *c;
c = cycle->connections;
for (i = 0; i < cycle->connection_n; i++) {
/* THREAD: lock */
- if (c[i].fd != -1 && c[i].idle) {
+ if (c[i].fd != (ngx_socket_t) -1 && c[i].idle) {
c[i].close = 1;
c[i].read->handler(c[i].read);
}
}
}
ngx_int_t
_______________________________________________
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel