Skip to content

Commit

Permalink
[Issue #715] Fixing warnings generated by earlier versions of Xcode (…
Browse files Browse the repository at this point in the history
…/cc Ignacio Rodrigo)

Minor reformatting
  • Loading branch information
mattt committed Jan 6, 2013
1 parent 6cf4565 commit b7ec928
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
4 changes: 2 additions & 2 deletions AFNetworking/AFHTTPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`.
Expand Down
35 changes: 24 additions & 11 deletions AFNetworking/AFHTTPClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -1057,6 +1065,9 @@ @interface AFHTTPBodyPart () {
}

- (BOOL)transitionToNextPhase;
- (NSInteger)readData:(NSData *)data
intoBuffer:(uint8_t *)buffer
maxLength:(NSUInteger)length;
@end

@implementation AFHTTPBodyPart
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b7ec928

Please sign in to comment.