]> git.kaiwu.me - nginx.git/commitdiff
Win32: suppressed warnings by "-Werror=sign-compare".
authorKouhei Sutou <kou@cozmixng.org>
Sat, 11 Oct 2014 12:09:29 +0000 (21:09 +0900)
committerKouhei Sutou <kou@cozmixng.org>
Sat, 11 Oct 2014 12:09:29 +0000 (21:09 +0900)
src/os/win32/ngx_wsasend_chain.c

index e28e1ee315d41d8954c02858f997ebcfa52807a0..fa725248c5850fd6d2f093361a87b02b28cebd16 100644 (file)
@@ -34,7 +34,7 @@ ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     /* 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_connection_t *c, ngx_chain_t *in, off_t limit)
 
         /* 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;
         }