diff --git a/Source/Additions/NSObject+GNUstepBase.m b/Source/Additions/NSObject+GNUstepBase.m index 09b318c4f..bab62e55b 100644 --- a/Source/Additions/NSObject+GNUstepBase.m +++ b/Source/Additions/NSObject+GNUstepBase.m @@ -99,7 +99,7 @@ format: @"[%@%c%@] not implemented", NSStringFromClass([self class]), c, aSel ? (id)NSStringFromSelector(aSel) : (id)@"(null)"]; - return nil; + return self; // Not reached } - (id) shouldNotImplement: (SEL)aSel @@ -111,7 +111,7 @@ format: @"[%@%c%@] should not be implemented", NSStringFromClass([self class]), c, aSel ? (id)NSStringFromSelector(aSel) : (id)@"(null)"]; - return nil; + return self; // Not reached } - (id) subclassResponsibility: (SEL)aSel @@ -122,7 +122,7 @@ format: @"[%@%c%@] should be overridden by subclass", NSStringFromClass([self class]), c, aSel ? (id)NSStringFromSelector(aSel) : (id)@"(null)"]; - return nil; + return self; // Not reached } @end diff --git a/Source/NSDictionary.m b/Source/NSDictionary.m index 01a445b5f..29ce4b5c0 100644 --- a/Source/NSDictionary.m +++ b/Source/NSDictionary.m @@ -238,8 +238,7 @@ static SEL appSel; */ - (NSEnumerator*) keyEnumerator { - [self subclassResponsibility: _cmd]; - return nil; + return [self subclassResponsibility: _cmd]; } /** @@ -248,8 +247,7 @@ static SEL appSel; */ - (id) objectForKey: (id)aKey { - [self subclassResponsibility: _cmd]; - return 0; + return [self subclassResponsibility: _cmd]; } - (id) objectForKeyedSubscript: (id)aKey @@ -262,8 +260,7 @@ static SEL appSel; */ - (NSEnumerator*) objectEnumerator { - [self subclassResponsibility: _cmd]; - return nil; + return [self subclassResponsibility: _cmd]; } /** @@ -1230,8 +1227,8 @@ compareIt(id o1, id o2, void* context) objects: (__unsafe_unretained id[])stackbuf count: (NSUInteger)len { - [self subclassResponsibility: _cmd]; - return 0; + [self subclassResponsibility: _cmd]; + return 0; } @end diff --git a/Source/NSHashTable.m b/Source/NSHashTable.m index 5c4098937..c456833ae 100644 --- a/Source/NSHashTable.m +++ b/Source/NSHashTable.m @@ -98,7 +98,7 @@ static Class concreteClass = 0; } - (id) initWithPointerFunctions: (NSPointerFunctions*)functions - capacity: (NSUInteger)initialCapacity + capacity: (NSUInteger)initialCapacity { [self subclassResponsibility: _cmd]; return nil;