src/http/ngx_http_spdy_filter_module.c, latest changesets compiler warnings

Valentin V. Bartenev vbart at nginx.com
Tue Jan 14 21:47:52 UTC 2014


On Tuesday 14 January 2014 16:33:39 itpp2012 wrote:
> VC 2010, 32bit mode.
> 

Ok.  Please, try a patch below:

diff -r 439d05a037a3 src/http/ngx_http_spdy_filter_module.c
--- a/src/http/ngx_http_spdy_filter_module.c    Wed Jan 15 01:44:52 2014 +0400
+++ b/src/http/ngx_http_spdy_filter_module.c    Wed Jan 15 01:44:57 2014 +0400
@@ -35,7 +35,7 @@ static ngx_inline ngx_int_t ngx_http_spd
     ngx_connection_t *fc, ngx_http_spdy_stream_t *stream);
 
 static ngx_chain_t *ngx_http_spdy_filter_get_shadow(
-    ngx_http_spdy_stream_t *stream, ngx_buf_t *buf, size_t offset,
+    ngx_http_spdy_stream_t *stream, ngx_buf_t *buf, off_t offset,
     size_t size);
 static ngx_http_spdy_out_frame_t *ngx_http_spdy_filter_get_data_frame(
     ngx_http_spdy_stream_t *stream, size_t len, ngx_chain_t *first,
@@ -702,7 +702,7 @@ ngx_http_spdy_send_chain(ngx_connection_
             *ln = cl;
             ln = &cl->next;
 
-            rest -= size;
+            rest -= (size_t) size;
             in = in->next;
 
             if (in == NULL) {
@@ -752,7 +752,7 @@ ngx_http_spdy_send_chain(ngx_connection_
             }
 
             if (limit < (off_t) slcf->chunk_size) {
-                frame_size = limit;
+                frame_size = (size_t) limit;
             }
         }
     }
@@ -777,7 +777,7 @@ ngx_http_spdy_send_chain(ngx_connection_
 
 static ngx_chain_t *
 ngx_http_spdy_filter_get_shadow(ngx_http_spdy_stream_t *stream, ngx_buf_t *buf,
-    size_t offset, size_t size)
+    off_t offset, size_t size)
 {
     ngx_buf_t    *chunk;
     ngx_chain_t  *cl;



More information about the nginx mailing list