Skip to content

Commit

Permalink
Fixes warning: implicit conversion changes signedness: 'unsigned int'…
Browse files Browse the repository at this point in the history
… to 'NSInteger' (aka 'int') when built with -Wsign-conversion. (Thanks @orj for this and related compiler warning fixes)
  • Loading branch information
mattt committed Sep 26, 2011
1 parent 65719ef commit 5ec70e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AFNetworking/AFHTTPClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ - (id)initWithStringEncoding:(NSStringEncoding)encoding;
}
}

static char const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

NSInteger idx = (i / 3) * 4;
NSUInteger idx = (i / 3) * 4;
output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F];
output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F];
output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '=';
Expand Down

0 comments on commit 5ec70e7

Please sign in to comment.