Hi,
I try to cleanup sope/ogo gsmake2 branch, also to get rid of compilation
warnings.
one of them is:
NGImap4ResponseNormalizer.m:686: warning: multiple declarations for
method `hasPrefix:'
/usr/local/include/Foundation/NSString.h:340: warning: using
`-(BOOL)hasPrefix:(NSString *)aString'
../../sope-core/NGExtensions/NGExtensions/NSData+misc.h:29: warning:
also found `-(BOOL)hasPrefix:(NSData *)_data'
The header file NSData+misc.h looks like this:
#import <Foundation/NSData.h>
@interface NSData(misc)
- (BOOL)hasPrefix:(NSData *)_data;
- (BOOL)hasPrefixBytes:(const void *)_bytes length:(unsigned)_len;
@end
the code where the warning is emitted looks like this:
static inline NSArray *
_imapFlags2Flags(NGImap4ResponseNormalizer *self, NSArray *_flags)
{
id obj;
...
while ((obj = [enumerator nextObject])) {
if ([obj isNotEmpty]) {
if ([obj hasPrefix:@"\\"])
objs[cnt] = [obj substringFromIndex:1];
else
objs[cnt] = obj;
cnt++;
}
}
...
}
my guess is that obj is id, and the compiler doesn't know, which one to use.
Is there a way to get rid of the warning?
cheers,
Sebastian
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep