[nginx] Win32: suppressed warnings by "-Werror=sign-compare".

Maxim Dounin mdounin at mdounin.ru
Tue Oct 14 00:19:47 UTC 2014


details:   http://hg.nginx.org/nginx/rev/35b8e5e98508
branches:  
changeset: 5873:35b8e5e98508
user:      Kouhei Sutou <kou at cozmixng.org>
date:      Sat Oct 11 21:09:29 2014 +0900
description:
Win32: suppressed warnings by "-Werror=sign-compare".

diffstat:

 src/os/win32/ngx_wsasend_chain.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/src/os/win32/ngx_wsasend_chain.c b/src/os/win32/ngx_wsasend_chain.c
--- a/src/os/win32/ngx_wsasend_chain.c
+++ b/src/os/win32/ngx_wsasend_chain.c
@@ -34,7 +34,7 @@ ngx_wsasend_chain(ngx_connection_t *c, n
 
     /* the maximum limit size is the maximum u_long value - the page size */
 
-    if (limit == 0 || limit > NGX_MAX_UINT32_VALUE - ngx_pagesize) {
+    if (limit == 0 || limit > (off_t) (NGX_MAX_UINT32_VALUE - ngx_pagesize)) {
         limit = NGX_MAX_UINT32_VALUE - ngx_pagesize;
     }
 
@@ -156,7 +156,7 @@ ngx_overlapped_wsasend_chain(ngx_connect
 
         /* the maximum limit size is the maximum u_long value - the page size */
 
-        if (limit == 0 || limit > NGX_MAX_UINT32_VALUE - ngx_pagesize) {
+        if (limit == 0 || limit > (off_t) (NGX_MAX_UINT32_VALUE - ngx_pagesize)) {
             limit = NGX_MAX_UINT32_VALUE - ngx_pagesize;
         }
 



More information about the nginx-devel mailing list