Skip to content
Browse files

Fixes iOS 7 Analyser Warnings

  • Loading branch information...
1 parent 6075ec9 commit 479fc36e23d8b0357b86a0918bc3a19964349cc4 @ObjColumnist ObjColumnist committed Jun 12, 2013
View
5 Authentication/Digest-MD5/XMPPDigestMD5Authentication.m
@@ -242,7 +242,10 @@ - (NSDictionary *)dictionaryFromChallenge:(NSXMLElement *)challenge
[value deleteCharactersInRange:NSMakeRange([value length]-1, 1)];
}
- [auth setObject:value forKey:key];
+ if(key && value)
+ {
+ [auth setObject:value forKey:key];
+ }
}
}
View
8 Core/XMPPParser.m
@@ -549,7 +549,11 @@ static void xmpp_xmlStartElement(void *ctx, const xmlChar *nodeName,
}
else
{
- lastAddedNs->next = newNs;
+ if(lastAddedNs != NULL)
+ {
+ lastAddedNs->next = newNs;
+ }
+
lastAddedNs = newNs;
}
@@ -583,7 +587,7 @@ static void xmpp_xmlStartElement(void *ctx, const xmlChar *nodeName,
{
newNode->nsDef = newNs;
}
- else
+ else if(lastAddedNs != NULL)
{
lastAddedNs->next = newNs;
}
View
51 Vendor/CocoaLumberjack/DDFileLogger.m
@@ -1017,14 +1017,49 @@ - (NSTimeInterval)age
- (NSString *)description
{
- return [@{@"filePath": self.filePath,
- @"fileName": self.fileName,
- @"fileAttributes": self.fileAttributes,
- @"creationDate": self.creationDate,
- @"modificationDate": self.modificationDate,
- @"fileSize": @(self.fileSize),
- @"age": @(self.age),
- @"isArchived": @(self.isArchived)} description];
+ NSMutableDictionary *description = [NSMutableDictionary dictionary];
+
+ if(self.filePath)
+ {
+ [description setValue:self.filePath forKey:@"filePath"];
+ }
+
+ if(self.fileName)
+ {
+ [description setValue:self.fileName forKey:@"fileName"];
+ }
+
+ if(self.fileAttributes)
+ {
+ [description setValue:self.fileAttributes forKey:@"fileAttributes"];
+ }
+
+ if(self.creationDate)
+ {
+ [description setValue:self.creationDate forKey:@"creationDate"];
+ }
+
+ if(self.modificationDate)
+ {
+ [description setValue:self.modificationDate forKey:@"modificationDate"];
+ }
+
+ if(self.fileSize)
+ {
+ [description setValue:@(self.fileSize) forKey:@"fileSize"];
+ }
+
+ if(self.age)
+ {
+ [description setValue:@(self.age) forKey:@"age"];
+ }
+
+ if(self.isArchived)
+ {
+ [description setValue:@(self.isArchived) forKey:@"isArchived"];
+ }
+
+ return [description description];
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 comments on commit 479fc36

Please sign in to comment.
Something went wrong with that request. Please try again.