mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
7f26ceaa54
commit
4445a58fd3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue