[MPlayer-dev-eng] [PATCH] Warning fixes
seru
seru at gmx.net
Sun Dec 22 00:33:00 CET 2002
El sáb, 21 de dic de 2002, a las 08:26:42 +0100, Arpi dijo:
> Hi,
>
> > > > Fix attached (fire-warningfix4.patch)
> > > > I copy/pasted the way it is done in loader/dshow/libwin32.h
> > >
> > > Have you tested it? I tried the same "fix" once and it caused SIGSEGV in qt
> > > loader.
> > Nope, but the warning disappeared. Don't commit that fix :)
>
> probably byteorder problem. at least windows and quicktime fourcc's are in
> different byteorder. (i have to bswap_32 everywhere to get them match)
If I understand well FOUR_CHAR_CODE is to convert a fourcc to 32 bit. In CIncludes/ConditionalMacros.h the macro is defined in many different ways, depending on the compiler:
#define FOUR_CHAR_CODE(x) (x)
This one for gcc-like compilers and Visual Studio with i386 target. It seems like the right one to me.
#define FOUR_CHAR_CODE(x) ((long)(x)) /* otherwise compiler will complain about values with high bit set */
For codewarrior
#define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
| (((unsigned long) ((x) & 0x0000FF00)) << 8) \
| (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
| (((unsigned long) ((x) & 0xFF000000)) >> 24)
This one for Visual Studio with a non-i386 target
In loader/dshow/libwin32.h:
#ifndef mmioFOURCC
#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \
( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
#endif /* mmioFOURCC */
You are sure this works ok, not?
I just copy/pasted without testing (stupid me), and I was happy when I saw the compiler warning disappeared.
I have got the qt6 sdk for win and mac, I'll send it to you.
>
> > #define FOUR_CHAR_CODE(x) ((unsigned long)(x)) /* otherwise compiler
> > will complain about values with high bit set */
> > [...]
> > Is the code that gives the warning (warning: multi-character character
> > constant)
> yes we know it all. i suggest you a big RTFA, most of the topics in your
I'll read the full archive of nov/dec 2002 :)
> today mails were discussed already in the near past.
Today I have written only:
[MPlayer-dev-eng] mplayer fails to link with newer binutils (decwin)
did search the archive before posting, nothing useful
[MPlayer-dev-eng] [PATCH] svgalib_helper in libdha
al3x hadn't committed a fix to the error I said yet, he did so after reading my message
And this thread -- so what do you mean if you say they were discussed in the past?
Or are you talking about the 5 patches of this thread? I indeed should have searched about the quicktime one, dunno about the rest.
Could fix 1,2,3 and 5 be commited before releasing 0.90?
>
> > very crappy code :/
> yes. and it's coming as-is from the quicktime SDK. don't blame us, but Apple.
I wouldn't dare to blame you ;)
>
> maybe someone with macos x should get the latest quicktime sdk, they
> probably changed it to be more unix-friendly.
> (the qt5 sdk i used supported only mac and windows C compilers & OS typedefs)
I just got the qt6 sdk, but it isn't very different.
>
>
> A'rpi / Astral & ESP-team
>
> --
> Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list