Commits

Jeff Laing committed 219afeb

No functional changes
Passing wrong number of arguments to one of the NSLog()
Fix some format strings that Xcode complained about.

Comments (0)

Files changed (1)

MobileDeviceAccess.m

 - (bool)checkStatus:(afc_error_t)ret from:(const char *)func
 {
 	if (ret != 0) {
-		[self setLastError:[NSString stringWithFormat:@"%s failed: %lx",func,ret]];
+		[self setLastError:[NSString stringWithFormat:@"%s failed: %d",func,ret]];
 		return NO;
 	}
 	[self clearLastError];
 		NSLog(@"disconnecting");
 		int ret = AFCConnectionClose(_afc);
 		if (ret != 0) {
-			NSLog(@"AFCConnectionClose failed: %lx", ret);
+			NSLog(@"AFCConnectionClose failed: %d", ret);
 		}
 		_afc = nil;
 	}
 	if (self = [super initWithName:@"com.apple.afc" onDevice:device]) {
 		int ret = AFCConnectionOpen(_service, 0/*timeout*/, &_afc);
 		if (ret != 0) {
-			NSLog(@"AFCConnectionOpen failed: %lx", ret);
+			NSLog(@"AFCConnectionOpen failed: %d", ret);
 			[self release];
 			self = nil;
 		}
 	if (self = [super initWithName:@"com.apple.crashreportcopymobile" onDevice:device]) {
 		int ret = AFCConnectionOpen(_service, 0/*timeout*/, &_afc);
 		if (ret != 0) {
-			NSLog(@"AFCConnectionOpen failed: %lx", ret);
+			NSLog(@"AFCConnectionOpen failed: %d", ret);
 			[self release];
 			self = nil;
 		}
 	if (self = [super initWithName:@"com.apple.afc2" onDevice:device]) {
 		int ret = AFCConnectionOpen(_service, 0/*timeout*/, &_afc);
 		if (ret != 0) {
-			NSLog(@"AFCConnectionOpen failed: %lx", ret);
+			NSLog(@"AFCConnectionOpen failed: %d", ret);
 			[self release];
 			self = nil;
 		}
 				} else {
 					int ret = AFCConnectionOpen(_service, 0/*timeout*/, &_afc);
 					if (ret != 0) {
-						NSLog(@"AFCConnectionOpen failed: %lx", ret);
+						NSLog(@"AFCConnectionOpen failed: %d", ret);
 						[self release];
 						self = nil;
 					}
 {
 	mach_error_t status;
 	status = AMDListenForNotifications(_service, AMNotificationProxy_callback, self);
-	if (status != ERR_SUCCESS) NSLog(@"AMDListenForNotifications returned %lx",status);
+	if (status != ERR_SUCCESS) NSLog(@"AMDListenForNotifications returned %d",status);
 }
 
 - (id)initWithAMDevice:(AMDevice*)device
 		NSString *s = NSStringFromSelector(notificationSelector);
 		NSLog(@"%@.%@ defined incorrectly for AMNotificationCenter.addObserver:selector:name:",c,s);
 		NSLog(@"It should be:");
-		NSLog(@"-(void)%@: (id)notificationname;",s,s);
+		NSLog(@"-(void)%@: (id)notificationname;",s);
 		return;
 	}
 
 			// we aren't watching this one yet, so start it now
 			mach_error_t status;
 			status = AMDObserveNotification(_service, (CFStringRef)notificationName);
-			if (status != ERR_SUCCESS) NSLog(@"AMDObserveNotification returned %lx",status);
+			if (status != ERR_SUCCESS) NSLog(@"AMDObserveNotification returned %d",status);
 
 			message_observers = [NSMutableArray new];
 			[_messages setObject:message_observers forKey:notificationName];