Browse files

Fixing warnings triggered by -Weverything flag

Explicitly covering all enum values in switch statements

Removing unused, unsynthesized properties

Adding missing synthesizers for properties

Fixing misuse of compiler macro
  • Loading branch information...
1 parent d933fe6 commit b317c7d5d9e23f2516b6b917249eb4705cab74e4 @mattt mattt committed Oct 1, 2012
Showing with 10 additions and 6 deletions.
  1. +10 −6 AFNetworking/AFHTTPClient.m
View
16 AFNetworking/AFHTTPClient.m
@@ -551,7 +551,7 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations
completionBlock(operations);
}
});
-#if AF_DISPATCH_RETAIN_RELEASE
+#ifdef AF_DISPATCH_RETAIN_RELEASE
dispatch_release(dispatchGroup);
#endif
}];
@@ -877,8 +877,6 @@ @interface AFMultipartBodyStream ()
@property (nonatomic, retain) NSMutableArray *HTTPBodyParts;
@property (nonatomic, retain) NSEnumerator *HTTPBodyPartEnumerator;
@property (nonatomic, retain) AFHTTPBodyPart *currentHTTPBodyPart;
-@property (nonatomic, retain) NSDate *lastReadAt;
-@property (nonatomic, assign) NSInteger lastBytesRead;
@end
@implementation AFMultipartBodyStream
@@ -1040,6 +1038,8 @@ @implementation AFHTTPBodyPart
@synthesize headers = _headers;
@synthesize bodyContentLength = _bodyContentLength;
@synthesize inputStream = _inputStream;
+@synthesize hasInitialBoundary = _hasInitialBoundary;
+@synthesize hasFinalBoundary = _hasFinalBoundary;
- (id)init {
self = [super init];
@@ -1088,12 +1088,16 @@ - (unsigned long long)contentLength {
- (BOOL)hasBytesAvailable {
switch (self.inputStream.streamStatus) {
+ case NSStreamStatusOpen:
+ case NSStreamStatusReading:
+ case NSStreamStatusWriting:
+ return YES;
+ case NSStreamStatusNotOpen:
+ case NSStreamStatusOpening:
case NSStreamStatusAtEnd:
case NSStreamStatusClosed:
case NSStreamStatusError:
return NO;
- default:
- return YES;
}
}
@@ -1163,7 +1167,7 @@ - (BOOL)transitionToNextPhase {
[self.inputStream close];
_phase = AFFinalBoundaryPhase;
break;
- default:
+ case AFFinalBoundaryPhase:
_phase = AFEncapsulationBoundaryPhase;
break;
}

0 comments on commit b317c7d

Please sign in to comment.