View Issue Details

IDProjectCategoryView StatusLast Update
0001800SOGoSOPEpublic2012-05-10 13:51
Reporterbuzzdee Assigned Toludovic  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.14 
Fixed in Version1.3.15 
Summary0001800: PATCH unsigned int to -> NSUInteger fixes in sope-gdl1/GDLAccess/EOExpressionArray.[h|m]
Description

Hi,

compiling OGo, I get dozens of warnings like this:
LSDBObjectDeleteCommand.m:72: warning: multiple methods named '-objectAtIndex:' found
/usr/local/include/Foundation/NSArray.h:77: warning: using '-(id)objectAtIndex:(NSUInteger)index'
/usr/local/include/GDLAccess/EOExpressionArray.h:101: warning: also found '-(id)objectAtIndex:(unsigned int)_idx'

Those can be seen on OpenBSD amd64, using gnustep-base-1.24.0. Those warnings are a real annoyance, and hide a lot of other useful warnings. They show up, due to the fact that when including GDLAccess/GDLAccess.h, the EOExpressionArray.h is pulled in too. As far as I can see, compiling SOGo, I don't see those warnings, and grepping the source, I think, GDLAccess.h nor EOExpressionArray.h is not included anywhere. So it should not affect SOGo at all.
Attached patch makes those methods inline with NSArray, using NSUInteger instead of unsigned int.

Additional Information

Please consider this patch for inclusion in SOPE 1.3.15.

TagsNo tags attached.

Activities

2012-05-10 12:08

 

fix-many-warnings-compiling-ogo.diff (1,806 bytes)   
$OpenBSD$

unsigned int to -> NSUInteger fixes

--- sope-gdl1/GDLAccess/EOExpressionArray.h.orig	Wed May  9 19:03:53 2012
+++ sope-gdl1/GDLAccess/EOExpressionArray.h	Wed May  9 19:07:40 2012
@@ -94,11 +94,11 @@
 
 - (void)addObjectsFromExpressionArray:(EOExpressionArray *)_array;
 
-- (void)insertObject:(id)_obj atIndex:(unsigned int)_idx;
+- (void)insertObject:(id)_obj atIndex:(NSUInteger)_idx;
 - (void)addObjectsFromArray:(NSArray *)_array;
 - (void)addObject:(id)_object;
-- (unsigned int)indexOfObject:(id)_object;
-- (id)objectAtIndex:(unsigned int)_idx;
+- (NSUInteger)indexOfObject:(id)_object;
+- (id)objectAtIndex:(NSUInteger)_idx;
 - (id)lastObject;
 - (NSUInteger)count;
 - (NSEnumerator *)objectEnumerator;
$OpenBSD$

unsigned int to -> NSUInteger fixes

--- sope-gdl1/GDLAccess/EOExpressionArray.m.orig	Wed May  9 19:05:04 2012
+++ sope-gdl1/GDLAccess/EOExpressionArray.m	Wed May  9 19:08:41 2012
@@ -68,7 +68,7 @@
 	[[self objectAtIndex:0] isKindOfClass:[EORelationship class]])
 	    return [ctx expressionValueForAttributePath:self->array];
     else {
-	int i, count;
+	NSUInteger i, count;
 	id  result;
 	SEL sel;
 	IMP imp;
@@ -236,7 +236,7 @@
     [self->array addObjectsFromArray:_array->array];
 }
 
-- (void)insertObject:(id)_obj atIndex:(unsigned int)_idx {
+- (void)insertObject:(id)_obj atIndex:(NSUInteger)_idx {
     [self->array insertObject:_obj atIndex:_idx];
 }
 - (void)addObjectsFromArray:(NSArray *)_array {
@@ -247,11 +247,11 @@
     [self->array addObject:_object];
 }
 
-- (unsigned int)indexOfObject:(id)_object {
+- (NSUInteger)indexOfObject:(id)_object {
     return [self->array indexOfObject:_object];
 }
 
-- (id)objectAtIndex:(unsigned int)_idx {
+- (id)objectAtIndex:(NSUInteger)_idx {
     return [self->array objectAtIndex:_idx];
 }
 - (id)lastObject {
ludovic

ludovic

2012-05-10 13:50

administrator   ~0003882

Patch applied and pushed.

Issue History

Date Modified Username Field Change
2012-05-10 12:08 buzzdee New Issue
2012-05-10 12:08 buzzdee File Added: fix-many-warnings-compiling-ogo.diff
2012-05-10 13:50 ludovic Note Added: 0003882
2012-05-10 13:50 ludovic Status new => resolved
2012-05-10 13:50 ludovic Fixed in Version => 1.3.15
2012-05-10 13:50 ludovic Resolution open => fixed
2012-05-10 13:50 ludovic Assigned To => ludovic
2012-05-10 13:51 ludovic Status resolved => closed