static analyser tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@32378 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-26 15:53:44 +00:00
parent 3531c48adb
commit 790ee4cc55
4 changed files with 125 additions and 116 deletions

View file

@ -281,6 +281,8 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
- (id) init
{
if (nil != (self = [super init]))
{
if ([NSThread isMultiThreaded] == YES)
{
[self _createLock];
@ -290,6 +292,7 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
[allCachesLock lock];
NSHashInsert(allCaches, (void*)self);
[allCachesLock unlock];
}
return self;
}

View file

@ -250,9 +250,6 @@ static Class concreteClass = 0;
NSMutableString *graph;
NSArray *tmp;
p = l->header;
k = l->level;
graph = [[NSMutableString alloc] initWithCapacity: 1024];
[graph appendString:
[NSString stringWithFormat: @"digraph %@ {\n", graphName]];

View file

@ -140,7 +140,10 @@ typedef struct {
- (id) init
{
if (nil != (self = [super init]))
{
instances = NSCreateHashTable(NSNonRetainedObjectHashCallBacks, 0);
}
return self;
}
@ -882,6 +885,8 @@ typedef struct {
forPeriods: (unsigned)numberOfPeriods
ofLength: (unsigned)minutesPerPeriod
{
if (nil != (self = [super init]))
{
NSCalendarDate *c;
unsigned i;
@ -998,6 +1003,7 @@ typedef struct {
}
}
[c release];
}
return self;
}

View file

@ -83,6 +83,8 @@ static NSDate *startDate = nil;
}
- (id) init
{
if (nil != (self = [super init]))
{
NSTimeInterval ti = GSTickerTimeNow();
observers = [NSMutableArray new];
@ -91,6 +93,7 @@ static NSDate *startDate = nil;
selector: @selector(_tick:)
userInfo: self
repeats: NO];
}
return self;
}
@end