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

itpp2012 nginx-forum at nginx.us
Tue Jan 14 22:36:23 UTC 2014


You missed 2,

Line +-683:
            if (offset) {
                cl = ngx_http_spdy_filter_get_shadow(stream, in->buf,
//                                                     offset, size);
                                                     (off_t) offset,
(size_t) size);
                if (cl == NULL) {
                    return NGX_CHAIN_ERROR;
                }

and +-Line 760:
    if (offset) {
//        cl = ngx_http_spdy_filter_get_shadow(stream, in->buf, offset,
size);
        cl = ngx_http_spdy_filter_get_shadow(stream, in->buf, (off_t)
offset, (size_t) size);
        if (cl == NULL) {
            return NGX_CHAIN_ERROR;
        }


Additional warning +-line 684:
            if (offset) {
                cl = ngx_http_spdy_filter_get_shadow(stream, in->buf,
                                                    (off_t) offset, (size_t)
size);
                if (cl == NULL) {
                    return NGX_CHAIN_ERROR;
                }

                offset = 0;

src\http\ngx_http_spdy_filter_module.c(685): warning C4701: potentially
uninitialized local variable 'cl' used

When I add +-line 629:
    ngx_http_spdy_stream_t     *stream;
    ngx_http_spdy_loc_conf_t   *slcf;
    ngx_http_spdy_out_frame_t  *frame;
+    cl = NULL;

The warning is gone.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246444,246449#msg-246449



More information about the nginx mailing list