[MPlayer-dev-eng] [PATCH] misc small fixes (mostly gcc warnings)

Rich Felker dalias at aerifal.cx
Mon Nov 14 05:48:49 CET 2005


On Sun, Nov 13, 2005 at 08:07:24PM +0100, Roberto Togni wrote:
> On Sat, 12 Nov 2005 17:26:59 -0500
> Rich Felker <dalias at aerifal.cx> wrote:
> 
> > On Sat, Nov 12, 2005 at 10:46:07PM +0100, Dominik 'Rathann' Mierzejewski wrote:
> > > On Saturday, 12 November 2005 at 19:58, Rich Felker wrote:
> > > > On Sat, Nov 12, 2005 at 05:01:45PM +0100, Dominik 'Rathann' Mierzejewski 
> [...]
> > > libmpdemux/demuxer.h:
> > > [...]
> > > /**
> > >  * Demuxer description structure
> > >  */
> > > typedef struct demuxers_desc_st {
> > > [...]
> > >   // Seek
> > >   void (*seek)(struct demuxer_st *demuxer, float rel_seek_secs, int flags); ///< Optional
> > > [...]
> > > } demuxer_desc_t;
> > > 
> > > Seek functions aren't supposed to return anything currently, so we should
> > > either change the above struct definition or fix all demuxer seek
> > > functions. I've done the latter, but perhaps the former is correct.
> > 
> > I think the former is correct. Before the demuxer modularization
> > overhaul, seek functions were intended to return a success/failure
> > code. If this was broken in the big patch, it needs to be fixed, not
> > further broken. But it should be a separate patch from the warning
> > cleanups.
> > 
> There was both seek functions returning int and seek functions
> returning void before the demuxer patch, but in every case the return
> value was ignored. Probably i forgot to change these to void. If we
> prefer to change them all to int we can talk about it, but if we don't
> do anything with the result i see no reason to do it.

Even if we presently do nothing with the return value, getting rid of
in in the demuxers that supported return codes is destroying
functionality that was there and making the code more difficult to
read. I'm against any solution that removes the return values where
they already existed.

Rich




More information about the MPlayer-dev-eng mailing list