Fix various Xcode warnings

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-11-03 11:30:32 +01:00
parent 5010eef6fb
commit 8e1fdcb627
4 changed files with 18 additions and 3 deletions

View file

@ -23,14 +23,14 @@
@implementation UIBluetoothButton
#define check_auresult(au,method) \
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%i",method,au)
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
-(void) onOn {
//redirect audio to bluetooth
UInt32 size = sizeof(CFStringRef);
CFStringRef route="HeadsetBT";
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, &size, &route);
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, size, &route);
check_auresult(result,"set kAudioSessionProperty_AudioRoute HeadsetBT");
int allowBluetoothInput = 1;

View file

@ -40,7 +40,7 @@ static void audioRouteChangeListenerCallback (
AudioSessionInitialize(NULL, NULL, NULL, NULL);
OSStatus lStatus = AudioSessionAddPropertyListener(routeChangeID, audioRouteChangeListenerCallback, self);
if (lStatus) {
ms_error ("cannot register route change handler [%i]",lStatus);
ms_error ("cannot register route change handler [%ld]",lStatus);
}
}

View file

@ -24,6 +24,7 @@
-(void) onOff;
-(bool) isInitialStateOn;
@end
@interface UIToggleButton : UIButton <UIToggleButtonDelegate> {
@private
UIImage* mOnImage;

View file

@ -69,5 +69,19 @@
[mOffImage release];
}
-(void) onOn {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
}
-(void) onOff {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
}
-(bool) isInitialStateOn {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
return false;
}
@end