Opened 9 years ago
Closed 9 years ago
#4343 closed defect (invalid)
ffmpeg-2.5.4 compilation warnings
Reported by: | Mirraz | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Building ffmpeg-2.5.4 by gcc-4.9.2 I'v got this messages:
libavcodec/atrac3plus.c:1784:46: warning: array subscript is below array bounds [-Warray-bounds]
libavcodec/libx264.c:658:35: warning: the address of ‘val’ will always evaluate as ‘true’ [-Waddress]
First one is because of strange condition in atrac3plus.c:1771
Attachments (1)
Change History (5)
by , 9 years ago
Attachment: | atrac3plus.c-num_quant_units-compilation-warning.patch added |
---|
comment:1 by , 9 years ago
Propose patch that eliminates compilation warning in atrac3plus.c. Actually warning disappears only if I place accessing to trac3p_qu_to_subband[ctx->num_quant_units - 1] before calling decode_quant_wordlen(). But I changed strange condition in atrac3plus.c:1771 anyway (maybe I was wrong).
comment:2 by , 9 years ago
- Please send patches to ffmpeg-devel@ffmpeg.org
- That warning is bogus from an IRC discussion some time ago (can't find the log…), so this patch is wrong.
comment:3 by , 9 years ago
OK, you are right, condition is not "strange", it complies to specification which I found here: http://wiki.multimedia.cx/index.php?title=ATRAC3plus. My mistake.
But this warning is not bogus, warning appears because compiler discards its suggestion about "ctx->num_quant_units" (1<=num_quant_units<=32) when "ctx" passed to "decode_quant_wordlen(gb, ctx, num_channels, avctx)" and anything can happen to fields of "ctx".
Corrected patch was sent to ffmpeg-devel.
comment:4 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
These appear to be compiler bugs or limitations
warning elimination patch