Skip to content

Commit bb39d35

Browse files
committed
Fix compilation warnings
Signed-off-by: Darshan Sen <raisinten@gmail.com>
1 parent 68d79ab commit bb39d35

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/apple/http.mm

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
} // namespace
2020

2121
@interface BenoniHTTPTaskContextWrap : NSObject
22-
@property HTTPTaskContext *context;
22+
@property(nonatomic) HTTPTaskContext *context;
2323
- (BenoniHTTPTaskContextWrap *)initWithContext:(HTTPTaskContext *)context;
2424
- (void)dealloc;
2525
@end
@@ -44,7 +44,7 @@ - (void)dealloc {
4444

4545
@interface BenoniHTTPSessionDelegate
4646
: NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate>
47-
@property(readonly)
47+
@property(nonatomic, readonly)
4848
NSMutableDictionary<NSNumber *, BenoniHTTPTaskContextWrap *> *contextMap;
4949
- (BenoniHTTPSessionDelegate *)init;
5050

@@ -91,13 +91,13 @@ - (void)URLSession:(NSURLSession *)session
9191
if ([httpResponse respondsToSelector:@selector(allHeaderFields)]) {
9292
auto &headers = context->headers;
9393
NSDictionary *allHeaderFields = [httpResponse allHeaderFields];
94-
for (NSString *key in allHeaderFields) {
95-
headers[[key UTF8String]] =
96-
[[allHeaderFields objectForKey:key] UTF8String];
94+
for (NSString *headerField in allHeaderFields) {
95+
headers[[headerField UTF8String]] =
96+
[[allHeaderFields objectForKey:headerField] UTF8String];
9797
}
9898
}
9999

100-
context->status = [httpResponse statusCode];
100+
context->status = static_cast<uint16_t>([httpResponse statusCode]);
101101

102102
context->encoding = NSUTF8StringEncoding;
103103
NSString *encodingName = [httpResponse textEncodingName];

0 commit comments

Comments
 (0)