Fixed more build warnings

This commit is contained in:
Pierre-Olivier Latour 2014-01-29 09:14:23 -08:00
parent 0f2f22a1b0
commit 36658278f8
4 changed files with 5 additions and 2 deletions

View File

@ -314,7 +314,7 @@ static void _NetServiceClientCallBack(CFNetServiceRef service, CFStreamError* er
- (BOOL)runWithPort:(NSUInteger)port { - (BOOL)runWithPort:(NSUInteger)port {
BOOL success = NO; BOOL success = NO;
_run = YES; _run = YES;
void* handler = signal(SIGINT, _SignalHandler); void (*handler)(int) = signal(SIGINT, _SignalHandler);
if (handler != SIG_ERR) { if (handler != SIG_ERR) {
if ([self startWithPort:port bonjourName:@""]) { if ([self startWithPort:port bonjourName:@""]) {
while (_run) { while (_run) {

View File

@ -26,6 +26,7 @@
*/ */
#import <TargetConditionals.h> #import <TargetConditionals.h>
#import <AvailabilityMacros.h>
#if __has_feature(objc_arc) #if __has_feature(objc_arc)
#define ARC_BRIDGE __bridge #define ARC_BRIDGE __bridge

View File

@ -243,7 +243,7 @@
type = kGCDWebServerDefaultMimeType; type = kGCDWebServerDefaultMimeType;
} }
if ((self = [super initWithContentType:type contentLength:info.st_size])) { if ((self = [super initWithContentType:type contentLength:(NSUInteger)info.st_size])) {
_path = [path copy]; _path = [path copy];
if (attachment) { // TODO: Use http://tools.ietf.org/html/rfc5987 to encode file names with special characters instead of using lossy conversion to ISO 8859-1 if (attachment) { // TODO: Use http://tools.ietf.org/html/rfc5987 to encode file names with special characters instead of using lossy conversion to ISO 8859-1
NSData* data = [[path lastPathComponent] dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:YES]; NSData* data = [[path lastPathComponent] dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:YES];

View File

@ -29,6 +29,8 @@
@implementation AppDelegate @implementation AppDelegate
@synthesize window=_window;
#if !__has_feature(objc_arc) #if !__has_feature(objc_arc)
- (void)dealloc { - (void)dealloc {