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

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Nov 13 00:42:05 CET 2005


On Saturday, 12 November 2005 at 23:26, Rich Felker 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 wrote:
> > > > -// is this needed? #include <sys/perm.h>
> > > > +//#include <sys/perm.h> doesn't exist on libc5 systems, declare extern instead
> > > > +extern int iopl(int level);
> > > 
> > > Return type is default and argument type does not need declaration in
> > > C. It would be better to use:
> > > 
> > > int iopl();
> > > 
> > > in case kernel devs stupidly change int to unsigned or something in
> > > the future. Or just omit the declaration entirely since it's totally
> > > unnecessary.
> > 
> > Actually, according to man 2 iopl:
> >        Libc5 treats it as a system call and has a prototype in <unistd.h>. 
> >        Glibc1 does not have a prototype. Glibc2 has a prototype both in 
> >        <sys/io.h> and in <sys/perm.h>. Avoid the latter, it is available
> >        on i386 only.
> > 
> > So, if this is correct, this code may not even compile on a glibc1 system.
> 
> There's no such thing as a glibc1 system, is there? :)

Isn't glibc1 == libc5? Yet a cursory google search suggest there was something
called glibc1.

> Anyway I agree, sys/io.h is the correct include.

... but it doesn't exist in libc5 (I've checked).

[...]
> > 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.

OK. I'll see what I can do.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"




More information about the MPlayer-dev-eng mailing list