diff --git a/src/os/win32/ngx_wsasend_chain.c b/src/os/win32/ngx_wsasend_chain.c index e28e1ee31..fa725248c 100644 --- 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, 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; }