diff --git a/Classes/ChatRoomTableViewController.m b/Classes/ChatRoomTableViewController.m index a89ab138a..ef8bf5307 100644 --- a/Classes/ChatRoomTableViewController.m +++ b/Classes/ChatRoomTableViewController.m @@ -170,7 +170,7 @@ cell = [[[UIChatRoomCell alloc] initWithIdentifier:kCellId] autorelease]; } - LinphoneChatMessage* chat = ms_list_nth_data(self->messageList, [indexPath row]); + LinphoneChatMessage* chat = ms_list_nth_data(self->messageList, (int)[indexPath row]); [cell setChatMessage:chat]; [cell setChatRoomDelegate:chatRoomDelegate]; return cell; @@ -182,7 +182,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if(editingStyle == UITableViewCellEditingStyleDelete) { [tableView beginUpdates]; - LinphoneChatMessage *chat = ms_list_nth_data(self->messageList, [indexPath row]); + LinphoneChatMessage *chat = ms_list_nth_data(self->messageList, (int)[indexPath row]); if( chat ){ linphone_chat_room_delete_message(chatRoom, chat); @@ -204,7 +204,7 @@ } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - LinphoneChatMessage* message = ms_list_nth_data(self->messageList, [indexPath row]); + LinphoneChatMessage* message = ms_list_nth_data(self->messageList, (int)[indexPath row]); return [UIChatRoomCell height:message width:[self.view frame].size.width]; } diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index 8f2dbebde..f60abd2b1 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -748,9 +748,9 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta [tableController.view setFrame:tableFrame]; // Scroll to bottom - int lastSection = [tableController.tableView numberOfSections] - 1; + NSInteger lastSection = [tableController.tableView numberOfSections] - 1; if(lastSection >= 0) { - int lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1; + NSInteger lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1; if(lastRow >=0) { [tableController.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection] atScrollPosition:UITableViewScrollPositionBottom @@ -810,9 +810,9 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta } // Scroll - int lastSection = [tableController.tableView numberOfSections] - 1; + NSInteger lastSection = [tableController.tableView numberOfSections] - 1; if(lastSection >= 0) { - int lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1; + NSInteger lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1; if(lastRow >=0) { [tableController.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection] atScrollPosition:UITableViewScrollPositionBottom diff --git a/Classes/ContactDetailsTableViewController.m b/Classes/ContactDetailsTableViewController.m index 3b0b8ca47..bc09f348b 100644 --- a/Classes/ContactDetailsTableViewController.m +++ b/Classes/ContactDetailsTableViewController.m @@ -141,7 +141,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe [contactDetailsDelegate onModification:nil]; } -- (NSMutableArray*)getSectionData:(int)section { +- (NSMutableArray*)getSectionData:(NSInteger)section { if(contactSections[section] == ContactSections_Number) { return [dataCache objectAtIndex:0]; } else if(contactSections[section] == ContactSections_Sip) { diff --git a/Classes/ImageSharing.h b/Classes/ImageSharing.h index 971a8cbfe..1a59c2828 100644 --- a/Classes/ImageSharing.h +++ b/Classes/ImageSharing.h @@ -35,7 +35,7 @@ @private NSInteger totalBytesExpectedToRead; id delegate; - int statusCode; + NSInteger statusCode; } + (id)newImageSharingUpload:(NSURL*)url image:(UIImage*)image delegate:(id)delegate userInfo:(id)userInfo; diff --git a/Classes/ImageSharing.m b/Classes/ImageSharing.m index 6ab27490e..0b41cfc6c 100644 --- a/Classes/ImageSharing.m +++ b/Classes/ImageSharing.m @@ -115,7 +115,7 @@ now lets create the body of the post */ NSMutableData *body = [NSMutableData data]; - NSString *imageName = [NSString stringWithFormat:@"%i-%f.jpg", [image hash],[NSDate timeIntervalSinceReferenceDate]]; + NSString *imageName = [NSString stringWithFormat:@"%lu-%f.jpg", (unsigned long)[image hash],[NSDate timeIntervalSinceReferenceDate]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@\"\r\n",imageName] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[@"Content-Type: application/octet-stream\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index ad99a9a47..5a6cd7606 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -323,7 +323,7 @@ } - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { - Linphone_log(@"%@ - state = %d", NSStringFromSelector(_cmd), application.applicationState); + Linphone_log(@"%@ - state = %ld", NSStringFromSelector(_cmd), application.applicationState); [self fixRing]; diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 003845045..936bd9427 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -484,14 +484,14 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); bool range = [match rangeAtIndex:2].length > 0; if(!range) { NSRange rangeMinPort = [match rangeAtIndex:1]; - *minPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMinPort] integerValue]]; + *minPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMinPort] intValue]]; *maxPort = *minPort; return TRUE; } else { NSRange rangeMinPort = [match rangeAtIndex:1]; - *minPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMinPort] integerValue]]; + *minPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMinPort] intValue]]; NSRange rangeMaxPort = [match rangeAtIndex:4]; - *maxPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMaxPort] integerValue]]; + *maxPort = [LinphoneCoreSettingsStore validPort:[[text substringWithRange:rangeMaxPort] intValue]]; if(*minPort > *maxPort) { *minPort = *maxPort; } diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index ade6c018a..94679323f 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1057,7 +1057,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } else if (proxy){ NSInteger defaultExpire = [[LinphoneManager instance] lpConfigIntForKey:@"default_expires"]; if (defaultExpire>=0) - linphone_proxy_config_expires(proxy, defaultExpire); + linphone_proxy_config_expires(proxy, (int)defaultExpire); //else keep default value from linphonecore } diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m index b75dab986..f5c03e651 100644 --- a/Classes/LinphoneUI/UIChatCell.m +++ b/Classes/LinphoneUI/UIChatCell.m @@ -72,7 +72,7 @@ #pragma mark - - (NSString *)accessibilityValue { - return [NSString stringWithFormat:@"%@ - %@ (%d)", addressLabel.text, chatContentLabel.text, [unreadMessageLabel.text integerValue]]; + return [NSString stringWithFormat:@"%@ - %@ (%ld)", addressLabel.text, chatContentLabel.text, (long)[unreadMessageLabel.text integerValue]]; } - (LinphoneChatMessage*)getLastIncomingMessage { diff --git a/Classes/LinphoneUI/UILinphone.m b/Classes/LinphoneUI/UILinphone.m index ab35fe731..edc2d5b51 100644 --- a/Classes/LinphoneUI/UILinphone.m +++ b/Classes/LinphoneUI/UILinphone.m @@ -36,7 +36,7 @@ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't convert not RGB color"]; return self; } else { - const float *colors = CGColorGetComponents(cgColor); + const CGFloat *colors = CGColorGetComponents(cgColor); rgbaR = colors[0]; rgbaG = colors[1]; rgbaB = colors[2]; @@ -64,7 +64,7 @@ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't convert not RGB color"]; return self; } else { - const float *colors = CGColorGetComponents(cgColor); + const CGFloat *colors = CGColorGetComponents(cgColor); rgbaR = colors[0]; rgbaG = colors[1]; rgbaB = colors[2]; diff --git a/Classes/Utils/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m b/Classes/Utils/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m index fd24bf097..8b85b3cc2 100755 --- a/Classes/Utils/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m +++ b/Classes/Utils/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m @@ -53,7 +53,7 @@ } - (int)integerForKey:(NSString*)key { - return [[NSUserDefaults standardUserDefaults] integerForKey:key]; + return (int)[[NSUserDefaults standardUserDefaults] integerForKey:key]; } - (id)objectForKey:(NSString*)key { diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 5e3313f13..e2c265262 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -759,8 +759,8 @@ static UICompositeViewDescription *compositeDescription = nil; NSString *email = [WizardViewController findTextField:ViewElement_Email view:contentView].text; NSMutableString *errors = [NSMutableString string]; - int username_length = [[LinphoneManager instance] lpConfigIntForKey:@"username_length" forSection:@"wizard"]; - int password_length = [[LinphoneManager instance] lpConfigIntForKey:@"password_length" forSection:@"wizard"]; + NSInteger username_length = [[LinphoneManager instance] lpConfigIntForKey:@"username_length" forSection:@"wizard"]; + NSInteger password_length = [[LinphoneManager instance] lpConfigIntForKey:@"password_length" forSection:@"wizard"]; if ([username length] < username_length) { [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"The username is too short (minimum %d characters).\n", nil), username_length]];