From: helge Date: Mon, 25 Apr 2005 17:39:42 +0000 (+0000) Subject: fixed gcc 4.0 warnings X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6dd8b56d5ee5f998614ba48f61f99262981a8d9;p=sope fixed gcc 4.0 warnings git-svn-id: http://svn.opengroupware.org/SOPE/trunk@773 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-gdl1/GDLContentStore/ChangeLog b/sope-gdl1/GDLContentStore/ChangeLog index 3803df16..de899321 100644 --- a/sope-gdl1/GDLContentStore/ChangeLog +++ b/sope-gdl1/GDLContentStore/ChangeLog @@ -1,3 +1,7 @@ +2005-04-25 Helge Hess + + * fixed gcc 4.0 warnings (v4.5.28) + 2005-03-21 Helge Hess * GNUmakefile: added FHS support (v4.5.27) diff --git a/sope-gdl1/GDLContentStore/GCSFieldInfo.m b/sope-gdl1/GDLContentStore/GCSFieldInfo.m index 9f041935..8035091e 100644 --- a/sope-gdl1/GDLContentStore/GCSFieldInfo.m +++ b/sope-gdl1/GDLContentStore/GCSFieldInfo.m @@ -46,11 +46,13 @@ - (id)initWithPropertyList:(id)_plist { if ((self = [super init])) { - self->columnName = [[_plist objectForKey:@"columnName"] copy]; - self->sqlType = [[_plist objectForKey:@"sqlType"] copy]; + NSDictionary *plist = _plist; - self->allowsNull = [[_plist objectForKey:@"allowsNull"] boolValue]; - self->isPrimaryKey = [[_plist objectForKey:@"isPrimaryKey"] boolValue]; + self->columnName = [[plist objectForKey:@"columnName"] copy]; + self->sqlType = [[plist objectForKey:@"sqlType"] copy]; + + self->allowsNull = [[plist objectForKey:@"allowsNull"] boolValue]; + self->isPrimaryKey = [[plist objectForKey:@"isPrimaryKey"] boolValue]; if (![self->columnName isNotNull] || ![self->sqlType isNotNull]) { [self release]; diff --git a/sope-gdl1/GDLContentStore/GCSFolderManager.m b/sope-gdl1/GDLContentStore/GCSFolderManager.m index 6c3f7d91..29b8bbf8 100644 --- a/sope-gdl1/GDLContentStore/GCSFolderManager.m +++ b/sope-gdl1/GDLContentStore/GCSFolderManager.m @@ -274,7 +274,7 @@ static const char *GCSPathColumnPattern = "c_path%i"; sql = [NSMutableString stringWithCapacity:(count * 8)]; for (i = 0; i < quickPathCount; i++) { NSString *pathColumn; - unsigned char buf[32]; + char buf[32]; sprintf(buf, GCSPathColumnPattern, (i + 1)); pathColumn = [[NSString alloc] initWithCString:buf]; diff --git a/sope-gdl1/GDLContentStore/GCSFolderType.m b/sope-gdl1/GDLContentStore/GCSFolderType.m index 9f407423..e59e389d 100644 --- a/sope-gdl1/GDLContentStore/GCSFolderType.m +++ b/sope-gdl1/GDLContentStore/GCSFolderType.m @@ -31,15 +31,17 @@ - (id)initWithPropertyList:(id)_plist { if ((self = [super init])) { - self->blobTablePattern = [[_plist objectForKey:@"blobTablePattern"] copy]; - self->quickTablePattern = [[_plist objectForKey:@"quickTablePattern"]copy]; + NSDictionary *plist = _plist; - self->extractorClassName = - [[_plist objectForKey:@"extractorClassName"] copy]; + self->blobTablePattern = [[plist objectForKey:@"blobTablePattern"] copy]; + self->quickTablePattern = [[plist objectForKey:@"quickTablePattern"]copy]; + + self->extractorClassName = + [[plist objectForKey:@"extractorClassName"] copy]; // TODO: qualifier; self->fields = [[GCSFieldInfo fieldsForPropertyList: - [_plist objectForKey:@"fields"]] retain]; + [plist objectForKey:@"fields"]] retain]; } return self; } diff --git a/sope-gdl1/GDLContentStore/Version b/sope-gdl1/GDLContentStore/Version index 6711565c..9014956b 100644 --- a/sope-gdl1/GDLContentStore/Version +++ b/sope-gdl1/GDLContentStore/Version @@ -2,7 +2,7 @@ MAJOR_VERSION:=4 MINOR_VERSION:=5 -SUBMINOR_VERSION:=27 +SUBMINOR_VERSION:=28 # v4.5.26 does not require libNGiCal anymore # v0.9.19 requires libNGiCal v4.5.40 diff --git a/sope-gdl1/MySQL/NSCalendarDate+MySQL4Val.m b/sope-gdl1/MySQL/NSCalendarDate+MySQL4Val.m index 674c62f0..54559bf2 100644 --- a/sope-gdl1/MySQL/NSCalendarDate+MySQL4Val.m +++ b/sope-gdl1/MySQL/NSCalendarDate+MySQL4Val.m @@ -74,7 +74,11 @@ static NSTimeZone *gmt02 = nil; break; } - self = [self initWithString:s calendarFormat:calfmt]; + if ((self = [self initWithString:s calendarFormat:calfmt]) == nil) { + NSLog(@"WARNING(%s): got no value for string '%@' format '%@'.", + __PRETTY_FUNCTION__, s, calfmt); + } + [s release]; [self setCalendarFormat:MYSQL4_DATETIME_FORMAT]; return self;