[MPlayer-dev-eng] [PATCH] Yet another batch of warning fixes :->

Dominik Mierzejewski dominik at rangers.eu.org
Tue Dec 10 13:45:56 CET 2002


On Tuesday, 10 December 2002, Arpi wrote:
> Hi,
> 
> > > > > it'll break code on 64bit platforms badly
> > > > 
> > > > Will it? How about uint32_t then? And avifile's loader has those
> > > what is the problem with int ?
> > 
> > Lots and lots of warnings about incompatible types.
> 
> then uint32_t won't help there... (it's typedef'ed as int by inttypes.h)
> 
> try to fix the causes instead of workarounding them...

Agreed. See below.

> > > > defines exactly like in my patch.
> > > yes and avifile is broken too. anyway avifile duplicates all those
> > > structs with int (instead of DWORD) in its include/ dir, and us eit for
> > > non-x86 platforms.
> > 
> > Interesting. I couldn't find it, however. If you could point me to the
> > right file... :-/
> 
> i mean in avifile sources, the structs (BITMAPINFOHEADER etc) are defined
> twice. once in its include/ (used on all platforms) and once in
> plugins/libwin32/loader/wine/* used only for x86. So, for avifile the 'long'
> is ok, as they use the wine headers on x86 only.

Found it. These structs should have the same size on all platforms, right?
So the proper solution would be to use uint32_t, uint16_t, and so on, like
avifile does in include/formats.h. Am I correct?

> but in mplayer, the windef.h is included in stheader.h which is used in all
> platforms, including 64bit ones.  the long was changed to int by a patch for
> Alpha support long time ago.

Understood.
 
-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"



More information about the MPlayer-dev-eng mailing list