[FFmpeg-devel] expected 'const uint8_t **' but argument is of type 'uint8_t **'

Michael Niedermayer michaelni
Wed Sep 8 10:45:43 CEST 2010


On Wed, Sep 08, 2010 at 09:24:23AM +0100, M?ns Rullg?rd wrote:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> 
> > Hi all,
> >
> > we have several of such warnings. To my naive eyes to pass a pointer
> > to a non-const area where it is expected a pointer to a const area
> > should be perfectly safe, but the compiler (GCC) is not of the same
> > opinion.
> >
> > Is that a compiler bug? Am I missing something?
> 
> It is a quirk of the C language.  "const type *" and "type *" are
> considered different types.  "type **" and "type *const *" would be
> compatible, only differing in the const.

well explained

what i would wish for is to be able to disable this pedantry in gcc while
leaving all the other const checking in place.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100908/b13a27ca/attachment.pgp>



More information about the ffmpeg-devel mailing list