- changed status to open
Nginx compile warning - ngx_http_sticky_misc.c: ngx_http_sticky_misc_set_cookie: expires_len’ may be used uninitialized
Compile Error / Warning:
cc1: warnings being treated as errors modules/nginx-sticky-module-ng-45973be2b64e//ngx_http_sticky_misc.c: In function ‘ngx_http_sticky_misc_set_cookie’: modules/nginx-sticky-module-ng-45973be2b64e//ngx_http_sticky_misc.c:39: error: ‘expires_len’ may be used uninitialized in this function make[1]: [objs/addon/nginx-sticky-module-ng-45973be2b64e/ngx_http_sticky_misc.o] Error 1 make[1]: Leaving directory `/root/Downloads/nginx-1.4.7' make: [build] Error 2
Suggested Patch
vi modules/nginx-sticky-module-ng/ngx_http_sticky_misc.c
ngx_int_t ngx_http_sticky_misc_set_cookie(ngx_http_request_t r, ngx_str_t name, ngx_str_t value, ngx_str_t domain, ngx_str_t path, time_t expires, unsigned secure, unsigned httponly) { u_char cookie, p; size_t len; ngx_table_elt_t set_cookie, elt; ngx_str_t remove; ngx_list_part_t part; ngx_uint_t i; char expires_str[80]; int expires_len=0;
Comments (5)
-
repo owner -
repo owner @koktean : what OS/version/compiler?
-
repo owner - changed status to resolved
1.2.4 bugfix issue 5
→ <<cset c825ea7c5c91>>
-
reporter I compile in Centos 6.5
nginx version: nginx/1.4.7 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
-
repo owner ok, i pushed the new version, looks good so far
- Log in to comment
we had a similar issue on SLES and worked around it like this:
i test your changes and report later