Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix static analyzer issues

  • Loading branch information...
commit 489bb0423a22532094de5f4242f771306fbd0ba8 1 parent 4105625
Blake Watters blakewatters authored
2  Code/CoreData/RKEntityByAttributeCache.m
View
@@ -106,11 +106,11 @@ - (void)load
NSError *error = nil;
NSArray *objectIDs = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];
+ [fetchRequest release];
if (error) {
RKLogError(@"Failed to load entity cache: %@", error);
return;
}
- [fetchRequest release];
self.attributeValuesToObjectIDs = [NSMutableDictionary dictionaryWithCapacity:[objectIDs count]];
for (NSManagedObjectID *objectID in objectIDs) {
2  Code/CoreData/RKObjectMappingProvider+CoreData.m
View
@@ -15,7 +15,7 @@ @implementation RKObjectMappingProvider (CoreData)
- (void)setObjectMapping:(RKObjectMappingDefinition *)objectMapping forResourcePathPattern:(NSString *)resourcePath withFetchRequestBlock:(RKObjectMappingProviderFetchRequestBlock)fetchRequestBlock {
[self setEntry:[RKObjectMappingProviderContextEntry contextEntryWithMapping:objectMapping
- userData:[fetchRequestBlock copy]] forResourcePathPattern:resourcePath];
+ userData:Block_copy(fetchRequestBlock)] forResourcePathPattern:resourcePath];
}
- (NSFetchRequest *)fetchRequestForResourcePath:(NSString *)resourcePath {
4 Code/Network/RKClient.m
View
@@ -126,8 +126,8 @@ + (RKClient *)clientWithBaseURL:(NSString *)baseURL username:(NSString *)usernam
- (id)init {
self = [super init];
if (self) {
- self.HTTPHeaders = [[NSMutableDictionary alloc] init];
- self.additionalRootCertificates = [[NSMutableSet alloc] init];
+ self.HTTPHeaders = [NSMutableDictionary dictionary];
+ self.additionalRootCertificates = [NSMutableSet set];
self.defaultHTTPEncoding = NSUTF8StringEncoding;
self.cacheTimeoutInterval = 0;
self.runLoopMode = NSRunLoopCommonModes;
3  Code/ObjectMapping/RKObjectManager.m
View
@@ -103,8 +103,7 @@ - (id)init {
- (id)initWithBaseURL:(RKURL *)baseURL {
self = [self init];
if (self) {
- self.client = [[RKClient alloc] initWithBaseURL:baseURL];
- [self.client release];
+ self.client = [RKClient clientWithBaseURL:baseURL];
self.acceptMIMEType = RKMIMETypeJSON;
}
2  Code/ObjectMapping/RKObjectMappingProviderContextEntry.m
View
@@ -52,7 +52,7 @@ + (RKObjectMappingProviderContextEntry *)contextEntryWithMapping:(RKObjectMappin
}
+ (RKObjectMappingProviderContextEntry *)contextEntryWithMapping:(RKObjectMappingDefinition *)mapping userData:(id)userData {
- RKObjectMappingProviderContextEntry * contextEntry = [RKObjectMappingProviderContextEntry contextEntryWithMapping:mapping];
+ RKObjectMappingProviderContextEntry *contextEntry = [RKObjectMappingProviderContextEntry contextEntryWithMapping:mapping];
contextEntry.userData = userData;
return contextEntry;
}
2  Code/Support/RKBenchmark.m
View
@@ -66,7 +66,7 @@ + (CFTimeInterval)measureWithExecutionBlock:(void (^)(void))block {
# pragma mark Initializers
+ (id)benchmarkWithName:(NSString *)name {
- return [[self alloc] initWithName:name];
+ return [[[self alloc] initWithName:name] autorelease];
}
- (id)initWithName:(NSString *)name {
Please sign in to comment.
Something went wrong with that request. Please try again.