Stage 1 of clang compiler warning patches.

pull/108/head
Euan Thoms 2015-10-31 14:10:03 +08:00
parent 0b490a00c6
commit 3c62cc744e
85 changed files with 185 additions and 165 deletions

View File

@ -58,7 +58,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// don't send negative reminder - not supported
if (delta > 0)
[s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", delta];
[s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta];
}
return s;

View File

@ -285,7 +285,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
[s appendString: @"<Body xmlns=\"AirSyncBase:\">"];
[s appendFormat: @"<Type>%d</Type>", 1];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", [o length]];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", (int)[o length]];
[s appendFormat: @"<Data>%@</Data>", o];
[s appendString: @"</Body>"];
}

View File

@ -140,7 +140,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Simple reccurrence rule of type "Monthly"
type = 2;
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>",
[[[self parent] startDate] dayOfMonth]];
(int)[[[self parent] startDate] dayOfMonth]];
}
}
else if ([self frequency] == iCalRecurrenceFrequenceYearly)

View File

@ -140,7 +140,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
[s appendString: @"<Body xmlns=\"AirSyncBase:\">"];
[s appendFormat: @"<Type>%d</Type>", 1];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", [o length]];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", (int)[o length]];
[s appendFormat: @"<Data>%@</Data>", o];
[s appendString: @"</Body>"];
}

View File

@ -267,7 +267,7 @@
NSObject <DOMNodeList> *list;
NSObject <DOMNode> *valueNode;
NSArray *elements;
NSString *property, *match;
NSString *property=nil, *match=nil;
list = [searchElement getElementsByTagName: @"prop"];
if ([list length])

View File

@ -500,7 +500,7 @@ static NSTimeInterval ChannelCollectionTimer = 5 * 60;
ms = [NSMutableString stringWithCapacity: 256];
[ms appendFormat: @"<0x%p[%@]: ", self, NSStringFromClass ([self class])];
[ms appendFormat: @" #adaptors=%d", [urlToAdaptor count]];
[ms appendFormat: @" #adaptors=%d", (int)[urlToAdaptor count]];
[ms appendString: @">"];
return ms;

View File

@ -414,7 +414,7 @@
if (group)
[str appendFormat: @"%@ (group: %@)\n", tag, group];
else
[str appendFormat: @"%@\n", tag, group];
[str appendFormat: @"%@\n", tag];
[str appendString: [self versitString]];

View File

@ -409,7 +409,7 @@ static NGCardsSaxHandler *sax = nil;
max = [children count];
if (max > 0)
{
[str appendFormat: @"\n %d children: {\n", [children count]];
[str appendFormat: @"\n %d children: {\n", (int)[children count]];
for (count = 0; count < max; count++)
[str appendFormat: @" %@\n",
[[children objectAtIndex: count] description]];

View File

@ -32,16 +32,16 @@
- (NSString *) iCalFormattedDateTimeString
{
return [NSString stringWithFormat: @"%.4d%.2d%.2dT%.2d%.2d%.2d",
[self yearOfCommonEra], [self monthOfYear],
[self dayOfMonth], [self hourOfDay],
[self minuteOfHour], [self secondOfMinute]];
(int)[self yearOfCommonEra], (int)[self monthOfYear],
(int)[self dayOfMonth], (int)[self hourOfDay],
(int)[self minuteOfHour], (int)[self secondOfMinute]];
}
- (NSString *) iCalFormattedDateString
{
return [NSString stringWithFormat: @"%.4d%.2d%.2d",
[self yearOfCommonEra], [self monthOfYear],
[self dayOfMonth]];
(int)[self yearOfCommonEra], (int)[self monthOfYear],
(int)[self dayOfMonth]];
}
@end

View File

@ -348,7 +348,7 @@ static inline unsigned iCalDoWForNSDoW (int dow)
if ([byDayMask occursOnDay: currentWeekDay])
{
if ([bySetPos containsObject:
[NSString stringWithFormat: @"%d", currentPos]])
[NSString stringWithFormat: @"%d", (int)currentPos]])
monthDays[monthDay+1] = YES;
currentPos++;
}
@ -362,7 +362,7 @@ static inline unsigned iCalDoWForNSDoW (int dow)
if ([byDayMask occursOnDay: currentWeekDay])
{
if ([bySetPos containsObject:
[NSString stringWithFormat: @"%d", currentPos]])
[NSString stringWithFormat: @"%d", (int)currentPos]])
monthDays[monthDay] = YES;
currentPos--;
}

View File

@ -309,10 +309,10 @@ NSString *iCalWeekDayString[] = { @"SU", @"MO", @"TU", @"WE", @"TH", @"FR",
else if ([frequency isEqualToString:@"SECONDLY"])
freq = iCalRecurrenceFrequenceSecondly;
else
freq = NSNotFound;
freq = (iCalRecurrenceFrequency) NSNotFound;
}
else
freq = NSNotFound;
freq = (iCalRecurrenceFrequency) NSNotFound;
return freq;
}

View File

@ -57,7 +57,7 @@
- (NSDictionary *) asDictionary
{
NSDictionary *data;
NSString *duration, *relation, *reference, *quantity, *unit;
NSString *duration, *relation, *reference, *quantity=@"", *unit=@"";
NSUInteger i;
unichar c;

View File

@ -1045,7 +1045,7 @@ static NSCharacterSet *whitespaceCharSet = nil;
if (debugOn)
{
NSLog(@"%s: trying to decode data (0x%p,len=%d) ...",
__PRETTY_FUNCTION__, _data, [_data length]);
__PRETTY_FUNCTION__, _data, (int)[_data length]);
}
if ((len = [_data length]) == 0)
@ -1164,7 +1164,7 @@ static NSCharacterSet *whitespaceCharSet = nil;
if (debugOn)
{
NSLog(@"%s: trying to parse string (0x%p,len=%d) ...",
__PRETTY_FUNCTION__, _source, [_source length]);
__PRETTY_FUNCTION__, _source, (int)[_source length]);
}
if (!_sysId) _sysId = @"<string>";
[self _parseString: _source];

View File

@ -344,7 +344,7 @@ size_t curl_body_function_freebusy(void *ptr, size_t size, size_t nmemb, void *i
NSMutableString *s;
s = [NSMutableString stringWithCapacity: 64];
[s appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
[s appendFormat:@"<0x%08X[%@]:", (unsigned int)self, NSStringFromClass([self class])];
if (freeBusyViewType)
[s appendFormat:@" freeBusyViewType='%@'", freeBusyViewType];
if (mergedFreeBusy)

View File

@ -84,7 +84,7 @@
#import "SOGoAppointmentFolders.h"
#import "SOGoFreeBusyObject.h"
#import "SOGoTaskObject.h"
#import "SOGoWebAppointmentFolder.h";
#import "SOGoWebAppointmentFolder.h"
#import "SOGoAppointmentFolder.h"
@ -2337,7 +2337,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
request = [context request];
if (!([request isIPhone] || [request isICal4]))
{
gdRT = [self groupDavResourceType];
gdRT = (NSArray *) [self groupDavResourceType];
gdVEventCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 0],
XMLNS_GROUPDAV, nil];
[colType addObject: gdVEventCol];

View File

@ -1992,7 +1992,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
if ([container resourceNameForEventUID: eventUID])
{
return [NSException exceptionWithHTTPStatus: 403
reason: [NSString stringWithFormat: @"Event UID already in use. (%s)", eventUID]];
reason: [NSString stringWithFormat: @"Event UID already in use. (%@)", eventUID]];
}
//

View File

@ -171,7 +171,7 @@
- (Class *) parsingClass
{
return [iCalCalendar class];
return (Class *)[iCalCalendar class];
}
- (NSString *) davContentType

View File

@ -102,9 +102,9 @@
}
if ([reminderReference caseInsensitiveCompare: @"BEFORE"] == NSOrderedSame)
aValue = [NSString stringWithString: @"-P"];
aValue = (NSString *) @"-P";
else
aValue = [NSString stringWithString: @"P"];
aValue = (NSString *) @"P";
if ([reminderUnit caseInsensitiveCompare: @"MINUTES"] == NSOrderedSame ||
[reminderUnit caseInsensitiveCompare: @"HOURS"] == NSOrderedSame)

View File

@ -267,7 +267,7 @@
- (NSTimeInterval) occurenceInterval
{
return [[self endDate] timeIntervalSinceDate: [self startDate]];
return (NSTimeInterval) [[self endDate] timeIntervalSinceDate: [self startDate]];
}
/**

View File

@ -162,7 +162,7 @@
rule = [iCalRecurrenceRule new];
[rule setInterval: @"1"];
frequency = NSNotFound;
frequency = (int)NSNotFound;
o = [repeat objectForKey: @"frequency"];
if ([o isKindOfClass: [NSString class]])
{

View File

@ -214,7 +214,7 @@
{
percent = [o intValue];
if (percent >= 0 && percent <= 100)
[self setPercentComplete: [NSString stringWithFormat: @"%i", percent]];
[self setPercentComplete: [NSString stringWithFormat: @"%i", (int)percent]];
}
else
[self setPercentComplete: @""];

View File

@ -327,7 +327,7 @@ convention:
if (year && month && day)
[self setBday: [NSString stringWithFormat: @"%.4d-%.2d-%.2d",
year, month, day]];
(int)year, (int)month, (int)day]];
else
[self setBday: @""];
@ -644,11 +644,11 @@ convention:
birthDay = [[self bday] asCalendarDate];
if (birthDay)
{
stringValue = [NSString stringWithFormat: @"%.4d", [birthDay yearOfCommonEra]];
stringValue = [NSString stringWithFormat: @"%.4d", (int)[birthDay yearOfCommonEra]];
[self _setValue: @"birthyear" to: stringValue inLDIFRecord: ldifRecord];
stringValue = [NSString stringWithFormat: @"%.2d", [birthDay monthOfYear]];
stringValue = [NSString stringWithFormat: @"%.2d", (int)[birthDay monthOfYear]];
[self _setValue: @"birthmonth" to: stringValue inLDIFRecord: ldifRecord];
stringValue = [NSString stringWithFormat: @"%.2d", [birthDay dayOfMonth]];
stringValue = [NSString stringWithFormat: @"%.2d", (int)[birthDay dayOfMonth]];
[self _setValue: @"birthday" to: stringValue inLDIFRecord: ldifRecord];
}
[self _setValue: @"description" to: [self note] inLDIFRecord: ldifRecord];

View File

@ -59,7 +59,7 @@
[response setHeader: [self davContentType] forKey: @"content-type"];
[response setHeader: [NSString stringWithFormat:@" %d",
[data length]]
(int)[data length]]
forKey: @"content-length"];
[response setContent: data];
}

View File

@ -268,9 +268,9 @@ Class SOGoContactSourceFolderK;
SOGoUser *currentUser;
id <SOGoSource> source;
if ([sourceID isEqualToString: @"personal"])
result = [NSException exceptionWithHTTPStatus: 403
reason: (@"folder '%@' cannot be deleted", sourceID)];
if ([sourceID isEqualToString: @"personal"]){
result = [NSException exceptionWithHTTPStatus: 403 reason: [NSString stringWithFormat: (@"folder '%@' cannot be deleted"), sourceID]];
}
else
{
result = nil;

View File

@ -50,7 +50,7 @@
- (Class *) parsingClass
{
return [NGVCard class];
return (Class *)[NGVCard class];
}
/* content */

View File

@ -45,7 +45,7 @@
- (Class *) parsingClass
{
return [NGVList class];
return (Class *)[NGVList class];
}

View File

@ -94,7 +94,7 @@
{
if (![newDisplayName length])
newDisplayName = newName;
ASSIGN (displayName, newDisplayName);
ASSIGN (displayName, [newDisplayName mutableCopy]);
}
return self;

View File

@ -533,7 +533,7 @@
messageID = [NSMutableString string];
[messageID appendFormat: @"<%@", [SOGoObject globallyUniqueObjectId]];
pGUID = [[NSProcessInfo processInfo] globallyUniqueString];
[messageID appendFormat: @"@%u>", [pGUID hash]];
[messageID appendFormat: @"@%u>", (unsigned int)[pGUID hash]];
return [messageID lowercaseString];
}

View File

@ -396,7 +396,7 @@ static BOOL debugOn = NO;
mimeType = @"application/octet-stream";
[response setHeader: mimeType forKey: @"content-type"];
[response setHeader: [NSString stringWithFormat:@"%d", [data length]]
[response setHeader: [NSString stringWithFormat:@"%d", (int)[data length]]
forKey: @"content-length"];
if (asAttachment)

View File

@ -1674,7 +1674,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
sortOrderings = [NSMutableArray array];
if ([self _sortElementIsAscending: sortElement])
if ([self _sortElementIsAscending: (NGDOMNodeWithChildren <DOMElement> *)sortElement])
sortOrderingOrder = EOCompareAscending;
else
sortOrderingOrder = EOCompareDescending;

View File

@ -73,10 +73,10 @@
- (NSString *) newLine
{
NSString *rc = [NSString stringWithString: @" "];
NSString *rc = @" ";
if (htmlComposition)
rc = [NSString stringWithString: @"<br/>"];
rc = @"<br/>";
return rc;
}

View File

@ -74,7 +74,7 @@
int i;
allLabels = [NSMutableArray array];
allKeys = [[theDefaults allKeys] sortedArrayUsingSelector: @selector (caseInsensitiveCompare:)];
allKeys = [[[theDefaults allKeys] sortedArrayUsingSelector: @selector (caseInsensitiveCompare:)] mutableCopy];
for (i = 0; i < [allKeys count]; i++)
{

View File

@ -779,9 +779,14 @@ static BOOL debugSoParts = NO;
[mimeType hasPrefix: @"audio/"] ||
[mimeType hasPrefix: @"image/"] ||
[mimeType hasPrefix: @"video/"])
{
filename = [NSString stringWithFormat: @"unknown_%@", path];
else if ([mimeType isEqualToString: @"message/rfc822"])
filename = [NSString stringWithFormat: @"email_%@.eml", path];
}
else
{
if ([mimeType isEqualToString: @"message/rfc822"])
filename = [NSString stringWithFormat: @"email_%@.eml", path];
}
}
if (filename)
@ -825,13 +830,13 @@ static BOOL debugSoParts = NO;
{
currentPart = [subparts objectAtIndex: i-1];
if (path)
newPath = [NSString stringWithFormat: @"%@.%d", path, i];
newPath = [NSString stringWithFormat: @"%@.%d", path, (int)i];
else
newPath = [NSString stringWithFormat: @"%d", i];
newPath = [NSString stringWithFormat: @"%d", (int)i];
[self _fetchFileAttachmentKeysInPart: currentPart
intoArray: keys
withPath: newPath
andPrefix: [NSString stringWithFormat: @"%@/%i", prefix, i]];
andPrefix: [NSString stringWithFormat: @"%@/%i", prefix, (int)i]];
}
}
else

View File

@ -310,7 +310,7 @@ static NSDictionary *BSONTypes()
case 'q': return 0x12;
default:
[NSException raise: NSInvalidArgumentException format: @"%@::%s - invalid encoding type '%c'", [self class], _cmd, encoding];
[NSException raise: NSInvalidArgumentException format: @"%@::%@ - invalid encoding type '%c'", [self class], NSStringFromSelector(_cmd), encoding];
}
return 0;
}
@ -385,7 +385,7 @@ static NSDictionary *BSONTypes()
}
[NSException raise: NSInvalidArgumentException format: @"%@::%s - invalid encoding type '%c'", [self class], _cmd, encoding];
[NSException raise: NSInvalidArgumentException format: @"%@::%@ - invalid encoding type '%c'", [self class], NSStringFromSelector(_cmd), encoding];
return nil;
}

View File

@ -1703,7 +1703,7 @@ _makeLDAPChanges (NGLdapConnection *ldapConnection,
hostname: hostname
port: [NSString stringWithFormat: @"%d", port]
encryption: encryption
bindAsCurrentUser: NO];
bindAsCurrentUser: [NSString stringWithFormat: @"%d", NO]];
[ab setBaseDN: [entry dn]
IDField: @"cn"
CNField: @"displayName"

View File

@ -90,9 +90,9 @@ static NSString *rfc822Months[] = {@"", @"Jan", @"Feb", @"Mar", @"Apr",
NSString *str;
str = [NSString stringWithFormat: @"%.4d%.2d%.2d",
[self yearOfCommonEra],
[self monthOfYear],
[self dayOfMonth]];
(int)[self yearOfCommonEra],
(int)[self monthOfYear],
(int)[self dayOfMonth]];
return str;
}
@ -109,9 +109,9 @@ static NSString *rfc822Months[] = {@"", @"Jan", @"Feb", @"Mar", @"Apr",
return
[NSString stringWithFormat: @"%@, %.2d %@ %d %.2d:%.2d:%.2d %+.4d",
rfc822Days[[self dayOfWeek]], [self dayOfMonth],
rfc822Months[[self monthOfYear]], [self yearOfCommonEra],
[self hourOfDay], [self minuteOfHour], [self secondOfMinute],
rfc822Days[[self dayOfWeek]], (int)[self dayOfMonth],
rfc822Months[[self monthOfYear]], (int)[self yearOfCommonEra],
(int)[self hourOfDay], (int)[self minuteOfHour], (int)[self secondOfMinute],
timeZoneShift];
}

View File

@ -46,7 +46,7 @@
{
NSString *newTag;
newTag = [NSString stringWithFormat: @"n%d", [namespaces count]];
newTag = [NSString stringWithFormat: @"n%d", (int)[namespaces count]];
[namespaces setObject: newTag forKey: newNS];
return newTag;

View File

@ -309,7 +309,7 @@ static int cssEscapingCount;
c == 0xD ||
(c >= 0x20 && c <= 0xD7FF) ||
(c >= 0xE000 && c <= 0xFFFD) ||
(c >= 0x10000 && c <= 0x10FFFF))
(c >= (unichar)0x10000 && c <= (unichar)0x10FFFF))
{
*(start+j) = c;
j++;

View File

@ -87,7 +87,7 @@ static EOAttribute *textColumn = nil;
{
tableUrl = nil;
initialized = NO;
objectType = -1;
objectType = (SOGoCacheObjectType) -1;
deleted = NO;
version = 0;
}
@ -394,7 +394,7 @@ static EOAttribute *textColumn = nil;
@"SELECT * FROM %@ WHERE c_path = %@",
tableName, pathValue];
if (startVersion > -1)
[sql appendFormat: @" AND c_version > %d", startVersion];
[sql appendFormat: @" AND c_version > %d", (int)startVersion];
/* execution */
records = [self performSQLQuery: sql];
@ -422,18 +422,16 @@ static EOAttribute *textColumn = nil;
tableName = [self tableName];
adaptor = [self tableChannelAdaptor];
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId]
forAttribute: textColumn];
/* query */
sql = [NSMutableString stringWithFormat:
@"SELECT * FROM %@ WHERE c_type = %d AND c_deleted <> 1", tableName, objectType];
if (startVersion > -1)
[sql appendFormat: @" AND c_version > %d", startVersion];
[sql appendFormat: @" AND c_version > %d", (int)startVersion];
if (deviceId) {
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@%", deviceId]
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId]
forAttribute: textColumn];
[sql appendFormat: @" AND c_path like %@", pathValue];
}
@ -557,7 +555,7 @@ static EOAttribute *textColumn = nil;
lastModifiedValue = (NSInteger) [lastModified timeIntervalSince1970];
if (objectType == -1)
if (objectType == (SOGoCacheObjectType) -1)
[NSException raise: @"SOGoCacheIOException"
format: @"object type has not been set for object '%@'",
self];
@ -587,7 +585,7 @@ static EOAttribute *textColumn = nil;
@")"),
tableName,
pathValue, parentPathValue, objectType,
creationDateValue, lastModifiedValue,
(int)creationDateValue, (int)lastModifiedValue,
propsValue];
isNew = NO;
}
@ -601,7 +599,7 @@ static EOAttribute *textColumn = nil;
@" c_version = %d, c_content = %@"
@" WHERE c_path = %@"),
tableName,
lastModifiedValue, deletedValue, version, propsValue,
(int)lastModifiedValue, (int)deletedValue, (int)version, propsValue,
pathValue];
}

View File

@ -94,7 +94,7 @@
{
[self subclassResponsibility: _cmd];
return nil;
return (Class *) nil;
}
- (void) _setRecord: (NSDictionary *) objectRecord
@ -254,6 +254,9 @@
- (NSException *) moveToFolder: (SOGoGCSFolder *) newFolder
{
[self subclassResponsibility: _cmd];
// TODO: Add exception handling code and return it
return (NSException *) nil;
}
- (NSException *) delete
@ -345,7 +348,7 @@
/* attempt a save */
error = [self saveComponent: [[self parsingClass] parseSingleFromSource: [rq contentAsString]]
error = [self saveComponent: [(id)[self parsingClass] parseSingleFromSource: [rq contentAsString]]
baseVersion: baseVersion];
if (error)
response = (WOResponse *) error;
@ -410,7 +413,7 @@
else
length = 0;
return [NSString stringWithFormat: @"%u", length];
return [NSString stringWithFormat: @"%u", (unsigned int)length];
}
- (NSException *) davMoveToTargetObject: (id) _target

View File

@ -107,7 +107,7 @@
- (void) setDisplayName: (NSString *) newDisplayName
{
ASSIGN (displayName, newDisplayName);
ASSIGN (displayName, [newDisplayName mutableCopy]);
}
- (NSString *) displayName

View File

@ -376,12 +376,12 @@ static NSArray *childRecordFields = nil;
if (!displayName)
{
if (activeUserIsOwner)
displayName = [self _displayNameFromOwner];
displayName = [[self _displayNameFromOwner] mutableCopy];
else
{
displayName = [self _displayNameFromSubscriber];
displayName = [[self _displayNameFromSubscriber] mutableCopy];
if (!displayName)
displayName = [self _displayNameFromOwner];
displayName = [[self _displayNameFromOwner] mutableCopy];
}
[displayName retain];
}
@ -829,7 +829,7 @@ static NSArray *childRecordFields = nil;
{
currentID = [ids objectAtIndex: count];
names = [[currentID componentsSeparatedByString: @"/"] objectEnumerator];
deleteObject = self;
deleteObject = (SOGoContentObject *)self;
while ((currentName = [names nextObject]))
{
deleteObject = [deleteObject lookupName: currentName

View File

@ -135,7 +135,7 @@
{
NSArray *allSources;
NGLdapEntry *entry;
NSObject <SOGoSource> *source;
NSObject <SOGoSource, SOGoDNSource> *source;
id o;
NSEnumerator *gclasses;
NSString *gclass;
@ -154,7 +154,7 @@
for (i = 0; i < [allSources count]; i++)
{
source = [[SOGoUserManager sharedUserManager] sourceWithID: [allSources objectAtIndex: i]];
source = (NSObject <SOGoSource, SOGoDNSource> *) [[SOGoUserManager sharedUserManager] sourceWithID: [allSources objectAtIndex: i]];
// Our different sources might not all implements groups support
if ([source respondsToSelector: theSelector])

View File

@ -1066,7 +1066,7 @@
[_ms appendFormat:@" name=%@", nameInContainer];
if (container)
[_ms appendFormat:@" container=0x%08X/%@",
container, [container valueForKey:@"nameInContainer"]];
(unsigned int)container, [container valueForKey:@"nameInContainer"]];
}
- (NSString *) description
@ -1074,7 +1074,7 @@
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
[ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@"<0x%08X[%@]:", (unsigned int) self, NSStringFromClass([self class])];
[self appendAttributesToDescription:ms];
[ms appendString:@">"];
@ -1084,7 +1084,7 @@
- (NSString *) loggingPrefix
{
return [NSString stringWithFormat:@"<0x%08X[%@]:%@>",
self, NSStringFromClass([self class]),
(unsigned int) self, NSStringFromClass([self class]),
[self nameInContainer]];
}

View File

@ -245,10 +245,10 @@ NSString *_stringForCharacterAtIndex(NSUInteger index, NSString *str, NSUInteger
sc2 = _stringForCharacterAtIndex(i, str2, length2);
if ([sc1 isEqualToString: sc2])
finalSTR = [finalSTR stringByAppendingFormat: @"%u |%@|\n", i, sc1];
finalSTR = [finalSTR stringByAppendingFormat: @"%lu |%@|\n", i, sc1];
else
{
finalSTR = [finalSTR stringByAppendingFormat: @"%u |%@|%@|<--\n", i, sc1, sc2];
finalSTR = [finalSTR stringByAppendingFormat: @"%lu |%@|%@|<--\n", i, sc1, sc2];
differencesFound = YES;
}
}

View File

@ -37,8 +37,8 @@
@"<johndown@test.com>", // email between brackets
@"\"<johndown@test.com>\" <johndown@test.com>", // doubled
// @"\"johndown@inverse.ca\" <johndown@test.com>", // with and without br.
@"Àñinéoblabla <johndown@test.com>", // accented full name
@"Àñinéoblabla Bla Blé <johndown@test.com>", // accented and multiword
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= <wolfgang@test.com>", // accented full name
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <wolfgang@test.com>", // accented and multiword
@"John Down \"Bla Bla\" <johndown@test.com>", // partly quoted
@"John Down <johndown@test.com>", // full name + email
@"John, Down <johndown@test.com>", // full name with comma + email
@ -123,8 +123,6 @@
testWithMessage([result isEqualToString: currentExp], error);
}
currentRaw++;
currentExp++;
}
}
@end

View File

@ -39,8 +39,8 @@
@"<wolfgang@test.com>", // email between brackets
@"\"<wolfgang@test.com>\" <wolfgang@test.com>", // doubled
@"\"wolfgang@inverse.ca\" <wolfgang@test.com>", // with and without br.
@"Àñinéoblabla <wolfgang@test.com>", // accented full name
@"Àñinéoblabla Bla Blé <wolfgang@test.com>", // accented and multiword
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= <wolfgang@test.com>", // accented full name
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <wolfgang@test.com>", // accented and multiword
@"Wolfgang Sourdeau \"Bla Bla\" <wolfgang@test.com>", // partly quoted
@"Wolfgang Sourdeau <wolfgang@test.com>", // full name + email
nil };
@ -50,8 +50,7 @@
@"\"<wolfgang@test.com>\" <wolfgang@test.com>", // doubled
@"\"wolfgang@inverse.ca\" <wolfgang@test.com>", // with and without br.
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= <wolfgang@test.com>", // accented full name
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <wolfgang@test.com>", // accented
// and multiword
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <wolfgang@test.com>", // accented and multiword
/* NOTE: the following are wrong but tolerated for now */
@"Wolfgang Sourdeau \"Bla Bla\" <wolfgang@test.com>", // partly quoted

View File

@ -117,7 +117,7 @@
NSString *diff = [self stringFromDiffBetween: [NSString stringWithString: resultString]
and: [NSString stringWithString: expected]];
NSString *testErrorMsg = [NSString
stringWithFormat: @">> For %@ header received:\n%@[END]\n>> instead of:\n%@[END]\n>> for:\n%@\n>> diff:\n%@\n>> lengthReceived: %u lengthExpected: %u",
stringWithFormat: @">> For %@ header received:\n%@[END]\n>> instead of:\n%@[END]\n>> for:\n%@\n>> diff:\n%@\n>> lengthReceived: %lu lengthExpected: %lu",
header,
resultString,
expected,

View File

@ -34,6 +34,10 @@
- (void) test_rendering
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-string-compare"
CardElement *element;
CardVersitRenderer *renderer;
NSString *result;
@ -137,10 +141,17 @@
testEquals(result, @"ELEM:NONEMPTY=coucou\r\n");
/** tests about parameters handling could be nice */
#pragma clang diagnostic pop
}
- (void) test_parsing
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-string-compare"
CardGroup *group;
CardElement *element;
NSString *versit;
@ -201,6 +212,9 @@
element = [group firstChildWithTag: @"element"];
testEquals([element flattenedValueAtIndex: 0 forKey: @""], @"value");
testEquals([element value: 0 ofAttribute: @"param1"], @"paramvalue1, with comma");
#pragma clang diagnostic pop
}
@end

View File

@ -107,7 +107,7 @@
[currentOccurrence descriptionWithCalendarFormat: dateFormat]];
testWithMessage([currentOccurrence isDateOnSameDay: [[occurrences objectAtIndex: j] startDate]], error);
}
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %i, expected %i)",
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %ld, expected %ld)",
[currentRule objectAtIndex: 1],
[occurrences count],
[currentRule count] - 2];
@ -211,7 +211,7 @@
[currentOccurrence descriptionWithCalendarFormat: dateFormat]];
testWithMessage([currentOccurrence isDateOnSameDay: [[occurrences objectAtIndex: j] startDate]], error);
}
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %i, expected %i)",
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %ld, expected %ld)",
[currentRule objectAtIndex: 1],
[occurrences count],
[currentRule count] - 2];
@ -376,7 +376,7 @@
[currentOccurrence descriptionWithCalendarFormat: dateFormat]];
testWithMessage([currentOccurrence isDateOnSameDay: [[occurrences objectAtIndex: j] startDate]], error);
}
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %i, expected %i)",
error = [NSString stringWithFormat: @"Unexpected number of occurrences for recurrence rule %@ (found %ld, expected %ld)",
[currentRule objectAtIndex: 1],
[occurrences count],
[currentRule count] - 2];

View File

@ -80,8 +80,8 @@
testWithMessage ((NSInteger) [testDate timeIntervalSince1970]
== occurrenceSeconds[count],
([NSString stringWithFormat:
@"test %d: seconds do not match:"
@" delta = %d", count, delta]));
@"test %ld: seconds do not match:"
@" delta = %ld", count, delta]));
}
}

View File

@ -81,8 +81,8 @@
timestamp = (int) [[NSDate date] timeIntervalSince1970];
pGUID = [[NSProcessInfo processInfo] globallyUniqueString];
messageID = [NSString stringWithFormat: @"<%0X-%0X-%0X-%0X@%u>",
pid, timestamp, sequence, random(), [pGUID hash]];
messageID = [NSString stringWithFormat: @"<%0X-%0X-%0X-%0X@%lu>",
pid, timestamp, sequence, (unsigned int)random(), [pGUID hash]];
return [messageID lowercaseString];
}

View File

@ -145,7 +145,7 @@ Class SOGoContactSourceFolderKlass = Nil;
[self _appendEntry: [resultEntries objectAtIndex: count]
toResult: result];
[result appendFormat: @"RESULT\ncode: %", resultCode];
[result appendFormat: @"RESULT\ncode: %d", resultCode];
[responseSocket
safeWriteData: [result dataUsingEncoding: NSASCIIStringEncoding]];
}

View File

@ -97,7 +97,7 @@
rc = [self createFolder: folder withFM: fm];
if (!rc)
{
NSLog (@"Create directory failed at path %s", folder);
NSLog (@"Create directory failed at path %@", folder);
return NO;
}

View File

@ -143,7 +143,7 @@
else
{
if (verbose)
NSLog(@"No session to remove", sessionsToDelete);
NSLog(@"No session to remove");
}
[cm releaseChannel: channel];

View File

@ -227,7 +227,7 @@ typedef enum
NSMutableString *sql;
sql = [NSMutableString stringWithFormat: @"DELETE FROM %@" @" WHERE c_path like '/%@%'", [oc tableName], deviceId];
sql = [NSMutableString stringWithFormat: @"DELETE FROM %@ WHERE c_path like '/%@'", [oc tableName], deviceId];
[oc performBatchSQLQueries: [NSArray arrayWithObject: sql]];
rc = YES;

View File

@ -175,7 +175,7 @@
now = [NSCalendarDate date];
delSql = [NSString stringWithFormat: @"UPDATE %@"
@" SET c_deleted = 1, c_lastmodified = %d,"
@" SET c_deleted = 1, c_lastmodified = %lu,"
@" c_content = ''"
@" WHERE c_name = '%@'",
tableName,

View File

@ -148,7 +148,7 @@
if (sqlError)
{
[ac rollbackTransaction];
NSLog([sqlError reason]);
NSLog(@"%@", [sqlError reason]);
}
else
rc = [ac commitTransaction];
@ -201,7 +201,7 @@
if (sqlError)
{
[ac rollbackTransaction];
NSLog([sqlError reason]);
NSLog(@"%@", [sqlError reason]);
}
else
rc = [ac commitTransaction];

View File

@ -115,7 +115,7 @@ typedef enum
[theKey caseInsensitiveCompare: @"Vacation"] == NSOrderedSame)
{
/* credentials file handling */
NSString *credsFilename, *authname, *authpwd;
NSString *credsFilename=nil, *authname=nil, *authpwd=nil;
SOGoCredentialsFile *cf;
credsFilename = [[NSUserDefaults standardUserDefaults] stringForKey: @"p"];

View File

@ -149,7 +149,7 @@
command, [currentTool objectAtIndex: 1]];
}
NSLog (helpString);
NSLog (@"%@", helpString);
}
- (void) registerTools

View File

@ -167,7 +167,7 @@
[self errorWithFormat:
@"not toolbar configuration found on SoObject: %@ (%@)",
[self clientObject], [[self clientObject] soClass]];
toolbarConfig = [[NSNull null] retain];
toolbarConfig = (NSArray *)[[NSNull null] retain];
return nil;
}

View File

@ -141,7 +141,7 @@
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];

View File

@ -81,9 +81,9 @@
inContext: [self context]
acquire: NO];
if ([currentChild respondsToSelector: @selector (vCard)])
[content appendFormat: [[currentChild ldifRecord] ldifRecordAsString]];
[content appendFormat: @"%@", [[currentChild ldifRecord] ldifRecordAsString]];
else if ([currentChild respondsToSelector: @selector (vList)])
[content appendFormat: [[currentChild vList] ldifString]];
[content appendFormat: @"%@", [[currentChild vList] ldifString]];
[content appendString: @"\n"];
}

View File

@ -384,7 +384,7 @@
data = [NSMutableString string];
[data appendString: postalCode];
if ([postalCode length] > 0 && [country length] > 0)
[data appendFormat: @", ", country];
[data appendFormat: @", "];
[data appendString: country];
return [self _cardStringWithLabel: nil value: data];

View File

@ -551,9 +551,9 @@ static NSData* _sanitizeContent(NSData *theData)
else
skipAttribute = YES;
}
else if ([name isEqualToString: @"background"] ||
else if (([name isEqualToString: @"background"] ||
([name isEqualToString: @"data"]
|| [name isEqualToString: @"classid"])
|| [name isEqualToString: @"classid"]))
&& [lowerName isEqualToString: @"object"])
{
value = [_attributes valueAtIndex: count];
@ -741,7 +741,7 @@ static NSData* _sanitizeContent(NSData *theData)
/* SaxLexicalHandler */
- (void) comment: (unichar *) _chars
length: (NSUInteger) _len
length: (int) _len
{
showWhoWeAre();
if (inStyle)
@ -807,7 +807,7 @@ static NSData* _sanitizeContent(NSData *theData)
}
[dump appendFormat: @"--- end ---\n"];
NSLog(dump);
NSLog(@"%@", dump);
[dump release];
}

View File

@ -228,7 +228,7 @@
info = [parts objectAtIndex: i];
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
[viewer setBodyInfo: info];
[viewer setPartPath: [[self contentPartPath] arrayByAddingObject: [NSString stringWithFormat: @"%d", i+1]]];
[viewer setPartPath: [[self contentPartPath] arrayByAddingObject: [NSString stringWithFormat: @"%d", (int)i+1]]];
[renderedParts addObject: [viewer renderedPart]];
}
}

View File

@ -33,7 +33,7 @@
- (void) setChildInfo: (id) _info;
- (id) childInfo;
- (void) setChildIndex: (unsigned int) _index;
- (void) setChildIndex: (NSUInteger) _index;
- (id) childPartPath;

View File

@ -61,7 +61,7 @@
return [NSString stringWithFormat: @"%u",
(unsigned int) ([self childIndex] + 1)];
char buf[8];
sprintf(buf, "%d", [self childIndex] + 1);
sprintf(buf, "%d", (int)[self childIndex] + 1);
return [NSString stringWithCString:buf];
}

View File

@ -287,7 +287,7 @@
if ([filename length])
// We replace any slash by a dash since Apache won't allow encoded slashes by default.
// See http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes
filename = [filename stringByReplacingString: @"/" withString: @"-"];
filename = [[filename stringByReplacingString: @"/" withString: @"-"] mutableCopy];
else
[filename appendFormat: @"%@-%@",
[self labelForKey: @"Untitled"],

View File

@ -451,7 +451,7 @@
NSMutableDictionary *moduleSettings, *threadsCollapsed;
NSMutableArray *mailboxThreadsCollapsed;
NSString *destinationFolder;
SOGoUserSettings *us;
SOGoUserSettings *us=nil;
WOResponse *response;
NSDictionary *data;
SOGoMailFolder *co;

View File

@ -620,7 +620,7 @@
- (NSString *) columnsDisplayCount
{
return [NSString stringWithFormat: @"%d", [[self columnsDisplayOrder] count]];
return [NSString stringWithFormat: @"%d", (int)[[self columnsDisplayOrder] count]];
}
- (void) setCurrentColumn: (NSDictionary *) newCurrentColumn

View File

@ -57,6 +57,7 @@
#import <Mailer/SOGoMailFolder.h>
#import <MailPartViewers/UIxMailRenderingContext.h> // cyclic
#import <MailPartViewers/UIxMailSizeFormatter.h>
#import <MailPartViewers/UIxMailPartViewer.h>
#import "WOContext+UIxMailer.h"
#import "UIxMailFormatter.h"
@ -229,7 +230,7 @@ static NSString *mailETag = nil;
- (id <WOActionResults>) defaultAction
{
id <WOActionResults> response;
WOResponse *response;
NSString *s;
NSMutableDictionary *data;
NSArray *addresses;

View File

@ -47,7 +47,7 @@
id dispatcher;
Class clazz;
request = [context request];
request = (WORequest *)[context request];
response = [self responseWithStatus: 200];
bundle = [NSBundle bundleForClass: NSClassFromString(@"ActiveSyncProduct")];

View File

@ -193,7 +193,7 @@
timeZone: [currentStartDate timeZone]];
// Increment counters for quarters of first hour
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
hourData = [dayData objectForKey: hourKey];
if (!hourData)
{
@ -224,7 +224,7 @@
while ([currentDate compare: currentEndDate] == NSOrderedAscending &&
[currentEndDate timeIntervalSinceDate: currentDate] >= 3600) // 1 hour
{
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
hourData = [dayData objectForKey: hourKey];
if (!hourData)
{
@ -251,7 +251,7 @@
// Increment counters for quarters of last hour
if ([currentEndDate timeIntervalSinceDate: currentDate] > 0)
{
hourKey = [NSString stringWithFormat: @"%u", [currentDate hourOfDay]];
hourKey = [NSString stringWithFormat: @"%u", (unsigned int)[currentDate hourOfDay]];
hourData = [dayData objectForKey: hourKey];
if (!hourData)
{

View File

@ -1471,15 +1471,15 @@ static NSArray *reminderValues = nil;
// if ([account updateFilters])
// // If Sieve is not enabled, the SOGoSieveManager will immediatly return a positive answer
// // See [SOGoSieveManager updateFiltersForAccount:withUsername:andPassword:]
// results = [self responseWithStatus: 200
// results = (id <WOActionResults>)[self responseWithStatus: 200
// andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:hasChanged], @"hasChanged", nil]];
// else
// results = [self responseWithStatus: 502
// results = (id <WOActionResults>)[self responseWithStatus: 502
// andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Connection error", @"textStatus", nil]];
// }
// else
// results = [self responseWithStatus: 503
// results = (id <WOActionResults>)[self responseWithStatus: 503
// andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Service temporarily unavailable", @"textStatus", nil]];
// }
// else
@ -2167,12 +2167,12 @@ static NSArray *reminderValues = nil;
if (![account updateFilters])
{
results = [self responseWithStatus: 502
results = (id <WOActionResults>) [self responseWithStatus: 502
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Connection error", @"textStatus", nil]];
}
}
else
results = [self responseWithStatus: 503
results = (id <WOActionResults>) [self responseWithStatus: 503
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Service temporarily unavailable", @"textStatus", nil]];
}
}
@ -2184,7 +2184,7 @@ static NSArray *reminderValues = nil;
}
if (!results)
results = [self responseWithStatus: 200];
results = (id <WOActionResults>) [self responseWithStatus: 200];
return results;
}

View File

@ -155,14 +155,14 @@
*/
[_buf appendFormat:@"%02i:%02i",
[_date hourOfDay],
[_date minuteOfHour]];
(int)[_date hourOfDay],
(int)[_date minuteOfHour]];
if (_refDate && ![_date isDateOnSameDay:_refDate]) {
[_buf appendFormat:@" (%02i-%02i",
[_date monthOfYear],
[_date dayOfMonth]];
(int)[_date monthOfYear],
(int)[_date dayOfMonth]];
if ([_date yearOfCommonEra] != [_refDate yearOfCommonEra])
[_buf appendFormat:@"-%04i", [_date yearOfCommonEra]];
[_buf appendFormat:@"-%04i", (int)[_date yearOfCommonEra]];
[_buf appendString:@")"];
}
}

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

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

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;
}

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"];

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
{

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"];

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]];
}
//

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];

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;
}