[MPlayer-dev-eng] [PATCH] configure: avoid warning in endian testing

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Sep 14 22:07:59 CEST 2010


On Tue, Sep 14, 2010 at 09:51:40PM +0200, Giorgio wrote:
> > Please don't, this might allow some compilers to optimize the whole
> > array way thus breaking the check.
> 
> I could live with the warning, but at this point I'd like to learn something :)
> What about "return 0;" then? (see patch #1)

Then the compiler (or linker) will almost certainly optimize it away
(i.e. with patch #2 configure would fail at least with some compilers.
And yes, that return was added by me for exactly that reason, originally
it was just return 0 and I did try ascii_name[0] first and it did not help).

> 
> > It might be a good idea to check for the endian-reversed string and
> > fail if neither or both were found in the binary.
> 
> See patch #2

If it works on bigendian and Diego is ok with it.


More information about the MPlayer-dev-eng mailing list