Permalink
Browse files

Fix compiler warnings with newer LLVM versions.

  • Loading branch information...
1 parent f659698 commit f45cbea0660d63df2a787ea969443b3d36a02ec1 @adamjernst committed Jun 18, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 AEURLConnection/AEExpect.m
  2. +2 −2 AEURLConnection/AEURLResponseProcessors.m
@@ -20,7 +20,7 @@ + (NSError *)error:(AEExpectErrorCode)code message:(NSString *)message {
}
+ (AEURLResponseProcessor)statusCode:(NSIndexSet *)acceptableCodes {
- return [[^(NSURLResponse *response, id data, NSError **error){
+ return [[^id(NSURLResponse *response, id data, NSError **error){
if (![response isKindOfClass:[NSHTTPURLResponse class]]) {
if (error) {
*error = [AEExpect error:AEExpectResponseNotHTTPError
@@ -51,7 +51,7 @@ + (NSIndexSet *)defaultAcceptableStatusCodes {
// Sets an error if the Content-Type header does not match one of the included
// acceptable content types, after removing any "charset" or other parameters.
+ (AEURLResponseProcessor)contentType:(NSSet *)acceptableTypes {
- return [[^(NSURLResponse *response, id data, NSError **error) {
+ return [[^id(NSURLResponse *response, id data, NSError **error) {
if (![acceptableTypes containsObject:[response MIMEType]]) {
if (error) {
*error = [AEExpect error:AEExpectInvalidContentTypeError
@@ -68,7 +68,7 @@ + (AEURLResponseProcessor)contentType:(NSSet *)acceptableTypes {
// Handy for use after an AEJSONProcessor, if you want to ensure that
// you're getting a dictionary vs. an array.
+ (AEURLResponseProcessor)responseClass:(Class)cl {
- return [[^(NSURLResponse *response, id data, NSError **error) {
+ return [[^id(NSURLResponse *response, id data, NSError **error) {
if (![data isKindOfClass:cl]) {
if (error) {
*error = [AEExpect error:AEExpectInvalidResponseClassError
@@ -13,7 +13,7 @@
@implementation AEURLResponseProcessors
+ (AEURLResponseProcessor)imageResponseProcessor {
- return [[^(NSURLResponse *response, id data, NSError **error) {
+ return [[^id(NSURLResponse *response, id data, NSError **error) {
UIImage *image = [[[UIImage alloc] initWithData:data] autorelease];
if (!image) {
if (error) {
@@ -35,7 +35,7 @@ + (AEURLResponseProcessor)chainedResponseProcessor:(AEURLResponseProcessor)first
[processors addObject:[[processor copy] autorelease]];
}
- return [[^(NSURLResponse *response, id data, NSError **error) {
+ return [[^id(NSURLResponse *response, id data, NSError **error) {
id newData = data;
for (AEURLResponseProcessor processor in processors) {
newData = processor(response, newData, error);

0 comments on commit f45cbea

Please sign in to comment.