Stage 1 of clang compiler warning patches.

This commit is contained in:
Euan Thoms
2015-10-31 14:10:03 +08:00
parent 0b490a00c6
commit 3c62cc744e
85 changed files with 185 additions and 165 deletions
+2 -2
View File
@@ -117,7 +117,7 @@
date = [self startDate];
return [NSString stringWithFormat: @"%.2d", [date monthOfYear]];
return [NSString stringWithFormat: @"%.2d", (int)[date monthOfYear]];
}
- (NSString *) headerMonthString
@@ -136,7 +136,7 @@
date = [self startDate];
return [NSString stringWithFormat: @"%d", [date yearOfCommonEra]];
return [NSString stringWithFormat: @"%d", (int)[date yearOfCommonEra]];
}
- (NSString *) localizedDayOfWeekName
+3 -2
View File
@@ -39,7 +39,8 @@
NSArray *weekDays;
NSString *currentView, *timeFormat, *currentTableHour;
NSCalendarDate *startDate, *currentTableDay;
NSMutableArray *daysToDisplay, *calendarsToDisplay, *currentCalendar, *hoursToDisplay;
NSMutableArray *daysToDisplay, *calendarsToDisplay, *hoursToDisplay;
NSMutableDictionary *currentCalendar;
unsigned int numberOfDays;
}
@@ -55,7 +56,7 @@
- (NSArray *) calendarsToDisplay;
- (void) setCurrentTableDay: (NSCalendarDate *) aTableDay;
- (NSCalendarDate *) currentTableDay;
- (NSMutableArray *) currentCalendar;
- (NSMutableDictionary *) currentCalendar;
@end
+6 -6
View File
@@ -193,7 +193,7 @@
NSMutableDictionary *calendar;
unsigned int count, foldersCount;
NSString *folderName, *fDisplayName;
NSNumber *isActive;
BOOL isActive;
co = [self clientObject];
folders = [co subFolders];
@@ -202,8 +202,8 @@
for (count = 0; count < foldersCount; count++)
{
folder = [folders objectAtIndex: count];
isActive = [NSNumber numberWithBool: [folder isActive]];
if ([isActive intValue] != 0) {
isActive = [folder isActive];
if (isActive != NO) {
calendar = [NSMutableDictionary dictionary];
folderName = [folder nameInContainer];
fDisplayName = [folder displayName];
@@ -216,7 +216,7 @@
[calendar setObject: fDisplayName forKey: @"displayName"];
[calendar setObject: folderName forKey: @"folder"];
[calendar setObject: [folder calendarColor] forKey: @"color"];
[calendar setObject: isActive forKey: @"active"];
[calendar setObject: [NSNumber numberWithBool:isActive] forKey: @"active"];
[calendar setObject: [folder ownerInContext: context]
forKey: @"owner"];
[calendarsToDisplay addObject: calendar];
@@ -237,12 +237,12 @@
return currentTableDay;
}
- (void) setCurrentCalendar: (NSMutableArray *) aCalendar
- (void) setCurrentCalendar: (NSMutableDictionary *) aCalendar
{
ASSIGN(currentCalendar, aCalendar);
}
- (NSMutableArray *) currentCalendar
- (NSMutableDictionary *) currentCalendar
{
return currentCalendar;
}
+1 -1
View File
@@ -164,7 +164,7 @@
date = [self selectedDate];
hmString = [NSString stringWithFormat:@"%.2d%.2d",
[date hourOfDay], [date minuteOfHour]];
(int)[date hourOfDay], (int)[date minuteOfHour]];
qp = [[self queryParameters] mutableCopy];
[self setSelectedDateQueryParameter:date inDictionary:qp];
[qp setObject: hmString forKey:@"hm"];
+7 -7
View File
@@ -367,7 +367,7 @@ static NSArray *tasksFields = nil;
NSString *owner, *role, *calendarName, *iCalString, *recurrenceTime;
NSRange match;
iCalCalendar *calendar;
iCalObject *master;
iCalEntityObject *master;
SOGoAppointmentFolder *currentFolder;
SOGoAppointmentFolders *clientObject;
SOGoUser *ownerUser;
@@ -400,11 +400,11 @@ static NSArray *tasksFields = nil;
else if ([criteria isEqualToString:@"entireContent"])
{
// First search : Through the quick table inside the location, category and title columns
quickInfos = [currentFolder fetchCoreInfosFrom: startDate
quickInfos = [[currentFolder fetchCoreInfosFrom: startDate
to: endDate
title: value
component: component
additionalFilters: criteria];
additionalFilters: criteria] mutableCopy];
// Save the c_name in another array to compare with
if ([quickInfos count] > 0)
@@ -416,10 +416,10 @@ static NSArray *tasksFields = nil;
}
// Second research : Every objects except for those already in the quickInfos array
allInfos = [currentFolder fetchCoreInfosFrom: startDate
allInfos = [[currentFolder fetchCoreInfosFrom: startDate
to: endDate
title: nil
component: component];
component: component] mutableCopy];
if (quickInfosFlag == YES)
{
for (i = ([allInfos count] - 1); i >= 0 ; i--) {
@@ -433,7 +433,7 @@ static NSArray *tasksFields = nil;
{
iCalString = [[allInfos objectAtIndex:i] objectForKey:@"c_content"];
calendar = [iCalCalendar parseSingleFromSource: iCalString];
master = [calendar firstChildWithTag:component];
master = (iCalEntityObject *)[calendar firstChildWithTag:component];
if (master) {
if ([[master comment] length] > 0)
{
@@ -1314,7 +1314,7 @@ _computeBlocksPosition (NSArray *blocks)
if ([currentView isEqualToString: @"multicolumndayview"])
{
calendars = [self _selectedCalendars];
calendars = [[self _selectedCalendars] mutableCopy];
eventsByCalendars = [NSMutableArray arrayWithCapacity:[calendars count]];
for (i = 0; i < [calendars count]; i++) // For each calendar
{
+1 -1
View File
@@ -271,7 +271,7 @@
[classes appendFormat: @"day weekOf%d week%dof%d day%d",
numberOfWeeks,
[weeksToDisplay indexOfObject: currentWeek],
(int)[weeksToDisplay indexOfObject: currentWeek],
numberOfWeeks, dayOfWeek];
if (realDayOfWeek == 0 || realDayOfWeek == 6)
[classes appendString: @" weekEndDay"];
+2 -1
View File
@@ -49,6 +49,7 @@ static NSArray *layoutItems = nil;
- (void) dealloc
{
[item release];
[super dealloc];
}
- (void) setItem: (NSString *) newItem
@@ -68,7 +69,7 @@ static NSArray *layoutItems = nil;
- (NSString *) itemPrintLayoutText
{
return [self labelForKey: [NSString stringWithFormat: item]];
return [self labelForKey: [NSString stringWithFormat: @"%@", item]];
}
//
+1 -1
View File
@@ -896,7 +896,7 @@ static NSArray *reminderValues = nil;
content = [NSMutableString string];
response = [context response];
[content appendFormat: [[self clientObject] contentAsString]];
[content appendFormat: @"%@", [[self clientObject] contentAsString]];
[response setHeader: @"text/plain; charset=utf-8"
forKey: @"content-type"];
[response appendContentString: content];
+1 -1
View File
@@ -158,7 +158,7 @@
[shortWeekDaysList retain];
}
id = [NSString stringWithFormat: @"weekDay%i", [shortWeekDaysList indexOfObject: item]];
id = [NSString stringWithFormat: @"weekDay%i", (int)[shortWeekDaysList indexOfObject: item]];
return id;
}