Nginx 1.2.1 warning when using clang
Maxim Dounin
mdounin at mdounin.ru
Tue Jun 26 07:01:28 UTC 2012
Hello!
On Tue, Jun 26, 2012 at 11:53:26AM +0800, Wendal Chen wrote:
> OpenSUSE 11.4 using clang
>
> warning :
>
> src/core/nginx.c:487:37: warning: array index of '3' indexes past the end
> of an array (that contains 3 elements) [-Warray-bounds]
> if (ngx_strcmp(var[i].data, "TZ") == 0
> ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
> src/core/ngx_string.h:57:70: note: expanded from:
> #define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2)
> ^
> /usr/include/bits/string2.h:817:28: note: expanded from:
> : __strcmp_gc (s1, s2, __s2_len))
> \
> ^
> /usr/include/bits/string2.h:911:27: note: expanded from:
> (__const char *) (s2))[3]);
> \
> ^ ~
> 1 warning generated.
> src/core/ngx_file.c:384:27: warning: array index of '3' indexes past the
> end of an array (that contains 3 elements) [-Warray-bounds]
[...]
This looks like glibc problem.
Maxim Dounin
More information about the nginx
mailing list