# HG changeset patch # User ranma # Date 1219585974 0 # Node ID 4da9ce4d83276a64f646a83a425a8fea5a1b5323 # Parent 5723b671a0f6c45db6d90cbdbf15f911ef56e620 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) diff -r 5723b671a0f6 -r 4da9ce4d8327 libao2/ao_oss.c --- a/libao2/ao_oss.c Sun Aug 24 13:36:04 2008 +0000 +++ b/libao2/ao_oss.c Sun Aug 24 13:52:54 2008 +0000 @@ -166,7 +166,7 @@ { 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; }