From: helge Date: Mon, 25 Apr 2005 19:51:20 +0000 (+0000) Subject: fixed gcc 4.0 warnings X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d433210e48deeba4bae84f324e6cb5345efe0ba2;p=sope fixed gcc 4.0 warnings git-svn-id: http://svn.opengroupware.org/SOPE/trunk@775 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index c15b752f..6c1fe824 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,7 @@ +2005-04-25 Helge Hess + + * iCalDateHolder.m, iCalDataSource.m: fixed gcc 4.0 warnings (v4.5.51) + 2005-03-23 Marcus Mueller * v4.5.50 diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index a3ca3e85..c7038352 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=50 +SUBMINOR_VERSION:=51 # v4.5.40 requires NGExtensions v4.5.145 # v4.5.37 requires NGExtensions v4.5.140 diff --git a/sope-ical/NGiCal/iCalDataSource.m b/sope-ical/NGiCal/iCalDataSource.m index 92b00f98..b84c3940 100644 --- a/sope-ical/NGiCal/iCalDataSource.m +++ b/sope-ical/NGiCal/iCalDataSource.m @@ -163,13 +163,14 @@ static SaxObjectDecoder *sax = nil; NSArray *calendars; unsigned i, count; - if (![[_cal objectForKey:@"tag"] isEqualToString:@"iCalendar"]) { + if (![[(NSDictionary *)_cal objectForKey:@"tag"] + isEqualToString:@"iCalendar"]) { [self logWithFormat: @"ERROR: calendar (entity=%@) passed in as a dictionary: %@", _cal]; } - if ((calendars = [_cal objectForKey:@"subcomponents"]) == nil) + if ((calendars=[(NSDictionary *)_cal objectForKey:@"subcomponents"])==nil) return nil; count = [calendars count]; diff --git a/sope-ical/NGiCal/iCalDateHolder.m b/sope-ical/NGiCal/iCalDateHolder.m index 202bb1e5..9f12d2e7 100644 --- a/sope-ical/NGiCal/iCalDateHolder.m +++ b/sope-ical/NGiCal/iCalDateHolder.m @@ -122,7 +122,7 @@ static NSTimeZone *gmt = nil; if ([s rangeOfString:@"T"].length == 0 && [s length] == 8) { /* hm, maybe a date without a time? like an allday event! */ int year, month, day; - unsigned char buf[16]; + char buf[16]; [s getCString:&(buf[0])]; buf[9] = '\0'; @@ -136,7 +136,7 @@ static NSTimeZone *gmt = nil; } else if ([s length] == 15) { int year, month, day, hour, minute, second; - unsigned char buf[24]; + char buf[24]; [s getCString:&(buf[0])]; second = atoi(&(buf[13])); buf[13] = '\0'; @@ -161,16 +161,18 @@ static NSTimeZone *gmt = nil; /* description */ +- (void)appendAttributesToDescription:(NSMutableString *)ms { + if (self->tag) [ms appendFormat:@" %@", self->tag]; + if (self->string) [ms appendFormat:@" '%@'", self->string]; + if (self->tzid) [ms appendFormat:@" tz=%@", self->tzid]; +} + - (NSString *)description { NSMutableString *ms; ms = [NSMutableString stringWithCapacity:128]; [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; - - if (self->tag) [ms appendFormat:@" %@", self->tag]; - if (self->string) [ms appendFormat:@" '%@'", self->string]; - if (self->tzid) [ms appendFormat:@" tz=%@", self->tzid]; - + [self appendAttributesToDescription:ms]; [ms appendString:@">"]; return ms; }