Fwd: [MPlayer-dev-eng] [PATCH] Fix several gcc compiler warnings in loader/dshow

Fabian Franz FabianFranz at gmx.de
Fri Nov 1 19:40:47 CET 2002


Am Donnerstag, 31. Oktober 2002 22:34 schrieben Sie:
> On Tue, Oct 29, 2002 at 11:19:36PM +0100, Fabian Franz wrote:
> > Hi, Arpi said, that I should send this patch, which only fixes some
> > warnings, to you in order to have it applied ...
> >
> > Mostly it were only issues with once using ULONG then using unsigned long
> > and pointer casting ...
> >
> > I think I read, that this list voted in favour of unsinged long, so I
> > used that.
>
> Hmm ULONG is defined as unsigned long - it's the typedef and there should
> be no difference here (well unless mplayer defines ULONG as unsigned int -
> but that's definitely not the problem of original DShow :))

You were right:

main/loader/wine/windef.h: lines 150-160

typedef unsigned int    DWORD;
typedef unsigned int    ULONG;

>
> Anyway  I've not applied your patches so far - but made few more fixes
> for warnings generated by latest gcc-3.2 for dshow subdirectory.
>
> > So I opted for changing unsigned long to DWORD.
>
> No - original interface is quite precise copy from Windows headers
> so we may easily see if there is something wrong - and I think
> there is no reason to change it.

Sure ...
>
> > PS: I see that those warnings are not relevant at all, but I think
> > someone send patches of this kind that were commited and as I again was
> > compiling mplayer, I used the time while it compiled to fix those
> > warnings, which occured first.
> > Warnings were:
> > warning: initialization discards qualifiers from pointer target type
> > warning: assignment from incompatible pointer type
> > PPS: I am using gcc 2.95.4.
>
> Hmm me too, but somehow I do not get these warnings in aviplay.
> I really suspect that someone has modified ULONG definition or
> something like this in mplayer sources - please check

Yes, I did, I have also cc'ed mplayer-dev eng, because I don't knwo who is 
responsible for the wine-folder ... A'rpi , you know ?

And if we can easily change ULONG to unsigned long, without expecting problems 
...

Anyway, it was a good to get feedback from you, so we can fix the cause not 
the symptoms ... :-)

Best regards,

Fabian



More information about the MPlayer-dev-eng mailing list