[FFmpeg-devel] Patch to reduce compiler warnings in libavcodec/aac_adtstoasc_bsf.c
Mon Jul 19 05:27:49 CEST 2010
On Sun, Jul 18, 2010 at 5:45 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> On Sun, Jul 18, 2010 at 04:26:24PM -0700, Paul Sterne wrote:
> > What is supposed to be const about buf? Not the pointer buf itself, but
> > contents of what buf is pointed to?
> > If buf was to be copied to poutbuff, shouldn't it remain const? If yes,
> > then poutbuf also needs to be const, and the routine should never need to
> > modify the contents of what is pointed to, whether by buf or by poutbuf.
> poutbuf must be av_free()ed in some cases, thus it cannot be const even if
> sometimes is pointing to a const array
> Can you tell me the source file where the av_free is performed on a
variable also passed for poutbuf to aac_adtsasc_bsf ?
My version built OK and with fewer warnings and passed all regression tests.
There may be cases where a variable that is not const will need to be cast
as const in the call to aac_adtsasc_bsf to eliminate a compiler warning, but
it would remain non-const in the calling function.
Question... what is the purpose of using the -Wcast-qual compiler flag to
generate so many of those warning messages, but apparently not responding to
those messages over time?
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> Breaking DRM is a little like attempting to break through a door even
> though the window is wide open and the only thing in the house is a bunch
> of things you dont want and which you would get tomorrow for free anyway
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> -----END PGP SIGNATURE-----
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel