[FFmpeg-cvslog] aviobuf: Fix warning about discarded qualifier

Michael Niedermayer michaelni at gmx.at
Fri Jul 27 18:47:39 CEST 2012


On Fri, Jul 27, 2012 at 06:30:52PM +0200, Reimar Döffinger wrote:
> On Fri, Jul 27, 2012 at 01:15:30PM +0200, jamal wrote:
> > ffmpeg | branch: master | jamal <jamrial at gmail.com> | Fri Jul 27 05:23:23 2012 -0300| [c49e0d2cdd8b91161f4b8c22b130ab4bd6e71b71] | committer: Michael Niedermayer
> > 
> > aviobuf: Fix warning about discarded qualifier
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > 
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c49e0d2cdd8b91161f4b8c22b130ab4bd6e71b71
> > ---
> > 
> >  libavformat/aviobuf.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> > index 05df001..f6a914a 100644
> > --- a/libavformat/aviobuf.c
> > +++ b/libavformat/aviobuf.c
> > @@ -122,7 +122,7 @@ AVIOContext *avio_alloc_context(
> >  static void writeout(AVIOContext *s, const uint8_t *data, int len)
> >  {
> >      if (s->write_packet && !s->error){
> > -        int ret= s->write_packet(s->opaque, data, len);
> > +        int ret= s->write_packet(s->opaque, (uint8_t *)data, len);
> 
> Doesn't that rather just hide that the write_packet definition is
> just wrong,

its not wrong, read only fields do not "need" to be const.
But of course you are right that its not the perfect solution,
perfect would be to fix write_packet() type and all uses of it
some of these uses might be outside our code
so i felt that weighting all factors this one line change was a
reasonable compromise compared to a ,much larger change that might
cause more troubble elsewhere
this doesnt mean iam against the larger change if someone wants to do
it

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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20120727/72ba2fcb/attachment.asc>


More information about the ffmpeg-cvslog mailing list