Permalink
Browse files

[Issue #715] Fixing warnings generated by earlier versions of Xcode (…

…/cc Ignacio Rodrigo)

Minor reformatting
  • Loading branch information...
1 parent 6cf4565 commit b7ec92850a686ad5f38dac6a57f828515a15f5d9 @mattt mattt committed Jan 6, 2013
Showing with 26 additions and 13 deletions.
  1. +2 −2 AFNetworking/AFHTTPClient.h
  2. +24 −11 AFNetworking/AFHTTPClient.m
@@ -109,7 +109,7 @@ typedef enum {
/**
The url used as the base for paths specified in methods such as `getPath:parameters:success:failure`
*/
-@property (readonly, nonatomic) NSURL *baseURL;
+@property (readonly, nonatomic, strong) NSURL *baseURL;
/**
The string encoding used in constructing url requests. This is `NSUTF8StringEncoding` by default.
@@ -126,7 +126,7 @@ typedef enum {
/**
The operation queue which manages operations enqueued by the HTTP client.
*/
-@property (readonly, nonatomic) NSOperationQueue *operationQueue;
+@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;
/**
The reachability status from the device to the current `baseURL` of the `AFHTTPClient`.
@@ -176,11 +176,11 @@ - (NSMutableURLRequest *)requestByFinalizingMultipartFormData;
#pragma mark -
@interface AFHTTPClient ()
-@property (readwrite, nonatomic) NSURL *baseURL;
-@property (readwrite, nonatomic) NSMutableArray *registeredHTTPOperationClassNames;
-@property (readwrite, nonatomic) NSMutableDictionary *defaultHeaders;
-@property (readwrite, nonatomic) NSURLCredential *defaultCredential;
-@property (readwrite, nonatomic) NSOperationQueue *operationQueue;
+@property (readwrite, nonatomic, strong) NSURL *baseURL;
+@property (readwrite, nonatomic, strong) NSMutableArray *registeredHTTPOperationClassNames;
+@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
+@property (readwrite, nonatomic, strong) NSURLCredential *defaultCredential;
+@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;
#ifdef _SYSTEMCONFIGURATION_H
@property (readwrite, nonatomic, assign) AFNetworkReachabilityRef networkReachability;
@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
@@ -199,6 +199,7 @@ @implementation AFHTTPClient
@synthesize parameterEncoding = _parameterEncoding;
@synthesize registeredHTTPOperationClassNames = _registeredHTTPOperationClassNames;
@synthesize defaultHeaders = _defaultHeaders;
+@synthesize defaultCredential = _defaultCredential;
@synthesize operationQueue = _operationQueue;
#ifdef _SYSTEMCONFIGURATION_H
@synthesize networkReachability = _networkReachability;
@@ -711,7 +712,7 @@ - (id)copyWithZone:(NSZone *)zone {
static NSString * const kAFMultipartFormCRLF = @"\r\n";
-static NSInteger const kAFStreamToStreamBufferSize = 1024*1024; //1 meg default
+static NSInteger const kAFStreamToStreamBufferSize = 1024 * 1024; //1 meg default
static inline NSString * AFMultipartFormInitialBoundary() {
return [NSString stringWithFormat:@"--%@%@", kAFMultipartFormBoundary, kAFMultipartFormCRLF];
@@ -749,7 +750,8 @@ @interface AFHTTPBodyPart : NSObject
@property (nonatomic, readonly, getter = hasBytesAvailable) BOOL bytesAvailable;
@property (nonatomic, readonly) unsigned long long contentLength;
-- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length;
+- (NSInteger)read:(uint8_t *)buffer
+ maxLength:(NSUInteger)length;
@end
@interface AFMultipartBodyStream : NSInputStream <NSStreamDelegate>
@@ -953,7 +955,9 @@ - (BOOL)isEmpty {
#pragma mark - NSInputStream
-- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
+- (NSInteger)read:(uint8_t *)buffer
+ maxLength:(NSUInteger)length
+{
if ([self streamStatus] == NSStreamStatusClosed) {
return 0;
}
@@ -974,7 +978,9 @@ - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
return bytesRead;
}
-- (BOOL)getBuffer:(__unused uint8_t **)buffer length:(__unused NSUInteger *)len {
+- (BOOL)getBuffer:(__unused uint8_t **)buffer
+ length:(__unused NSUInteger *)len
+{
return NO;
}
@@ -1003,7 +1009,9 @@ - (id)propertyForKey:(__unused NSString *)key {
return nil;
}
-- (BOOL)setProperty:(__unused id)property forKey:(__unused NSString *)key {
+- (BOOL)setProperty:(__unused id)property
+ forKey:(__unused NSString *)key
+{
return NO;
}
@@ -1057,6 +1065,9 @@ @interface AFHTTPBodyPart () {
}
- (BOOL)transitionToNextPhase;
+- (NSInteger)readData:(NSData *)data
+ intoBuffer:(uint8_t *)buffer
+ maxLength:(NSUInteger)length;
@end
@implementation AFHTTPBodyPart
@@ -1132,7 +1143,9 @@ - (BOOL)hasBytesAvailable {
}
}
-- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
+- (NSInteger)read:(uint8_t *)buffer
+ maxLength:(NSUInteger)length
+{
NSInteger bytesRead = 0;
if (_phase == AFEncapsulationBoundaryPhase) {

0 comments on commit b7ec928

Please sign in to comment.