[FFmpeg-cvslog] aviobuf: Fix warning about discarded qualifier
Michael Niedermayer
michaelni at gmx.at
Sat Jul 28 01:21:20 CEST 2012
On Fri, Jul 27, 2012 at 06:50:51PM +0200, Reimar Döffinger wrote:
> On Fri, Jul 27, 2012 at 06:47:39PM +0200, Michael Niedermayer wrote:
> > 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.
>
> Well, it isn't documented that write_packet may not write into data
> either.
fixed locally
> I'd kind of consider code that breaks when a user fails to magically
> guess a non-documented constraint at least kind of broken.
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
>
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20120728/712f40b4/attachment.asc>
More information about the ffmpeg-cvslog
mailing list