This isn't giving me an error but several warnings I'd like to get rid of.
OSErr err = AudioUnitInitialize(toneUnit);
NSAssert1(err == noErr, @"Error initializing unit: %ld", err);
The warning I'm getting is: Format specifies type 'long' but the argument has type 'OSErr' (aka 'short')
. Obviously I can change this by using long
instead of OSErr
but I was wondering why I'm getting the error. This is an upcast so I thought it shouldn't cause any problems.
Can anyone explain?