[FFmpeg-devel] GCC 5.1 warning: -Warray-bounds

Nicolas George george at nsup.org
Thu Jun 4 09:45:25 CEST 2015


Le quintidi 15 prairial, an CCXXIII, Ganesh Ajjanagadde a écrit :
> 1. using av_assert0() to ensure that array access remains in bounds in
> these few cases. This could lead to performance hit.

Using av_assert1() or av_assert2() will yield a performance hit, but only
when enabled in development builds.

But I agree with Hendrik, it should only be done when the correctness of the
code is not obvious for a reasonably smart human reader. If the compiler is
not smart enough to see it, then it only means it is too early to enable
that warning.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150604/dbefbd78/attachment.asc>


More information about the ffmpeg-devel mailing list