On Fri, 14 Oct 2011 15:54:28 +0200, Diego Biurrun <di...@biurrun.de> wrote:
> On Mon, Oct 10, 2011 at 06:30:04PM +0200, Anton Khirnov wrote:
> > On Mon, 10 Oct 2011 18:02:31 +0200, Diego Biurrun <di...@biurrun.de> wrote:
> > > On Mon, Oct 10, 2011 at 03:37:10PM +0200, Anton Khirnov wrote:
> > > > On Mon, 10 Oct 2011 14:37:45 +0200, Diego Biurrun <di...@biurrun.de> 
> > > > wrote:
> > > > > ---
> > > > >  libavformat/id3v2.h |    2 +-
> > > > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > > > 
> > > > > diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
> > > > > index 13dec39..7ac7a91 100644
> > > > > --- a/libavformat/id3v2.h
> > > > > +++ b/libavformat/id3v2.h
> > > > > @@ -63,7 +63,7 @@ typedef struct ID3v2EMFunc {
> > > > >      const char *tag3;
> > > > >      const char *tag4;
> > > > >      void (*read)(AVFormatContext*, AVIOContext*, int, char*, 
> > > > > ID3v2ExtraMeta **);
> > > > > -    void (*free)();
> > > > > +    void (*free)(ID3v2ExtraMetaGEOB*);
> > > > 
> > > > No, that should be void*
> > > 
> > > Your suggestion results in the following two new warnings, so I tend
> > > to disagree:
> > > 
> > > libavformat/id3v2.c: At top level:
> > > libavformat/id3v2.c:391:5: warning: initialization from incompatible 
> > > pointer type [enabled by default]
> > > libavformat/id3v2.c:391:5: warning: (near initialization for 
> > > ‘id3v2_extra_meta_funcs[0].please_use_av_free’) [enabled by default]
> >                                                                             
> >               ^^^^^^^^^^^^^^^^^^
> > The problem lies somewhere else. I wonder why that only appeared now though.
> 
> The struct declaration is in the .c file now and the situation is
> slightly changed.  Currently we have:
> 
>   void (*free)();
>   libavformat/id3v2.c:387:5: warning: function declaration isn’t a prototype
> 
> your proposal:
> 
>   void (*free)(void*);
>   libavformat/id3v2.c:391:5: warning: initialization from incompatible 
> pointer type
> 
> my proposal:
> 
>   void (*free)(ID3v2ExtraMetaGEOB *);
>   no warning
> 
> I'm still surprised why your proposal generates a warning though.
> 

Because free_geobtag has a different signature.
It probably should be changed to take a void* and cast it to
ID3v2ExtraMetaGEOB.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to