summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-24 13:52:54 +0000
committerranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-24 13:52:54 +0000
commit4445a58fd385ab95d40dcb303dcb71558cfd61f0 (patch)
tree27df4a204fdbd23e8c706d155c7de5b9d951cdb6 /libao2
parent7f26ceaa54b1956f9d2c8c36e4a85e7718066bb4 (diff)
downloadmpv-4445a58fd385ab95d40dcb303dcb71558cfd61f0.tar.bz2
mpv-4445a58fd385ab95d40dcb303dcb71558cfd61f0.tar.xz
Fix 'cast from pointer to integer of different size' on 64bit architectures. Casting to long should work for 32bit and 64bit and not make a difference to the boolean operation (since 'format' is always 32bit (int) the upper 32bit of 'arg' won't matter, but the compiler should be happy now. Casting both to unsigned makes sure the compiler isn't messing things up by sign-extending 'format' to 64bit before masking)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27482 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_oss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c
index b9939de8b7..ed70152077 100644
--- a/libao2/ao_oss.c
+++ b/libao2/ao_oss.c
@@ -166,7 +166,7 @@ static int control(int cmd,void *arg){
{
int format;
if (!ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &format))
- if (format & (int)arg)
+ if ((unsigned int)format & (unsigned long)arg)
return CONTROL_TRUE;
return CONTROL_FALSE;
}