Skip to content

Commit b7ec928

Browse files
committed
[Issue #715] Fixing warnings generated by earlier versions of Xcode (/cc Ignacio Rodrigo)
Minor reformatting
1 parent 6cf4565 commit b7ec928

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

AFNetworking/AFHTTPClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ typedef enum {
109109
/**
110110
The url used as the base for paths specified in methods such as `getPath:parameters:success:failure`
111111
*/
112-
@property (readonly, nonatomic) NSURL *baseURL;
112+
@property (readonly, nonatomic, strong) NSURL *baseURL;
113113

114114
/**
115115
The string encoding used in constructing url requests. This is `NSUTF8StringEncoding` by default.
@@ -126,7 +126,7 @@ typedef enum {
126126
/**
127127
The operation queue which manages operations enqueued by the HTTP client.
128128
*/
129-
@property (readonly, nonatomic) NSOperationQueue *operationQueue;
129+
@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;
130130

131131
/**
132132
The reachability status from the device to the current `baseURL` of the `AFHTTPClient`.

AFNetworking/AFHTTPClient.m

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ - (NSMutableURLRequest *)requestByFinalizingMultipartFormData;
176176
#pragma mark -
177177

178178
@interface AFHTTPClient ()
179-
@property (readwrite, nonatomic) NSURL *baseURL;
180-
@property (readwrite, nonatomic) NSMutableArray *registeredHTTPOperationClassNames;
181-
@property (readwrite, nonatomic) NSMutableDictionary *defaultHeaders;
182-
@property (readwrite, nonatomic) NSURLCredential *defaultCredential;
183-
@property (readwrite, nonatomic) NSOperationQueue *operationQueue;
179+
@property (readwrite, nonatomic, strong) NSURL *baseURL;
180+
@property (readwrite, nonatomic, strong) NSMutableArray *registeredHTTPOperationClassNames;
181+
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
182+
@property (readwrite, nonatomic, strong) NSURLCredential *defaultCredential;
183+
@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;
184184
#ifdef _SYSTEMCONFIGURATION_H
185185
@property (readwrite, nonatomic, assign) AFNetworkReachabilityRef networkReachability;
186186
@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
@@ -199,6 +199,7 @@ @implementation AFHTTPClient
199199
@synthesize parameterEncoding = _parameterEncoding;
200200
@synthesize registeredHTTPOperationClassNames = _registeredHTTPOperationClassNames;
201201
@synthesize defaultHeaders = _defaultHeaders;
202+
@synthesize defaultCredential = _defaultCredential;
202203
@synthesize operationQueue = _operationQueue;
203204
#ifdef _SYSTEMCONFIGURATION_H
204205
@synthesize networkReachability = _networkReachability;
@@ -711,7 +712,7 @@ - (id)copyWithZone:(NSZone *)zone {
711712

712713
static NSString * const kAFMultipartFormCRLF = @"\r\n";
713714

714-
static NSInteger const kAFStreamToStreamBufferSize = 1024*1024; //1 meg default
715+
static NSInteger const kAFStreamToStreamBufferSize = 1024 * 1024; //1 meg default
715716

716717
static inline NSString * AFMultipartFormInitialBoundary() {
717718
return [NSString stringWithFormat:@"--%@%@", kAFMultipartFormBoundary, kAFMultipartFormCRLF];
@@ -749,7 +750,8 @@ @interface AFHTTPBodyPart : NSObject
749750
@property (nonatomic, readonly, getter = hasBytesAvailable) BOOL bytesAvailable;
750751
@property (nonatomic, readonly) unsigned long long contentLength;
751752

752-
- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length;
753+
- (NSInteger)read:(uint8_t *)buffer
754+
maxLength:(NSUInteger)length;
753755
@end
754756

755757
@interface AFMultipartBodyStream : NSInputStream <NSStreamDelegate>
@@ -953,7 +955,9 @@ - (BOOL)isEmpty {
953955

954956
#pragma mark - NSInputStream
955957

956-
- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
958+
- (NSInteger)read:(uint8_t *)buffer
959+
maxLength:(NSUInteger)length
960+
{
957961
if ([self streamStatus] == NSStreamStatusClosed) {
958962
return 0;
959963
}
@@ -974,7 +978,9 @@ - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
974978
return bytesRead;
975979
}
976980

977-
- (BOOL)getBuffer:(__unused uint8_t **)buffer length:(__unused NSUInteger *)len {
981+
- (BOOL)getBuffer:(__unused uint8_t **)buffer
982+
length:(__unused NSUInteger *)len
983+
{
978984
return NO;
979985
}
980986

@@ -1003,7 +1009,9 @@ - (id)propertyForKey:(__unused NSString *)key {
10031009
return nil;
10041010
}
10051011

1006-
- (BOOL)setProperty:(__unused id)property forKey:(__unused NSString *)key {
1012+
- (BOOL)setProperty:(__unused id)property
1013+
forKey:(__unused NSString *)key
1014+
{
10071015
return NO;
10081016
}
10091017

@@ -1057,6 +1065,9 @@ @interface AFHTTPBodyPart () {
10571065
}
10581066

10591067
- (BOOL)transitionToNextPhase;
1068+
- (NSInteger)readData:(NSData *)data
1069+
intoBuffer:(uint8_t *)buffer
1070+
maxLength:(NSUInteger)length;
10601071
@end
10611072

10621073
@implementation AFHTTPBodyPart
@@ -1132,7 +1143,9 @@ - (BOOL)hasBytesAvailable {
11321143
}
11331144
}
11341145

1135-
- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length {
1146+
- (NSInteger)read:(uint8_t *)buffer
1147+
maxLength:(NSUInteger)length
1148+
{
11361149
NSInteger bytesRead = 0;
11371150

11381151
if (_phase == AFEncapsulationBoundaryPhase) {

0 commit comments

Comments
 (0)