[MPlayer-dev-eng] [PATCH] configure: avoid warning in endian testing
Giorgio
mywing81 at gmail.com
Tue Sep 14 14:54:04 CEST 2010
Hello,
this is probably not very important, but while reading the configure
script and its output on my Linux x86-64 box I noticed the following
warning:
##########################################
============ Checking for byte order ============
short ascii_name[] = {
(('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
(('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
int main(void) { return (int)ascii_name; }
cc /tmp/mplayer-configure--17275/tmp.c -I. -o
/tmp/mplayer-configure--17275/tmp
/tmp/mplayer-configure--17275/tmp.c: In function 'main':
/tmp/mplayer-configure--17275/tmp.c:3: warning: cast from pointer to
integer of different size
Result is: little-endian
##########################################
I think this happens because pointers are 8 bytes in x86-64. So, since
the return value of the executable file is not used, in order to avoid
the warning I propose the attached patch. Please apply if you think
this can be useful.
Regards,
Giorgio Vazzana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-configure-endian-testing.diff
Type: text/x-diff
Size: 534 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100914/680d0101/attachment.diff>
More information about the MPlayer-dev-eng
mailing list