No more compiler warnings.

This commit is contained in:
Corey Johnson 2011-11-10 14:53:44 -08:00
parent bccd592310
commit 0e0d0905b9
7 changed files with 10 additions and 18 deletions

View File

@ -9,7 +9,4 @@
- (AtomController *)createController:(NSString *)path;
- (void)removeController:(AtomController *)controller;
- (id)storageGet:(NSString *)keyPath defaultValue:(id)defaultValue;
- (id)storageSet:(NSString *)keyPath value:(id)value;
@end

View File

@ -11,6 +11,5 @@
@property (retain) JSCocoa *jscocoa;
- (AtomController *)initWithPath:(NSString *)aPath;
- (NSString *)tempfile;
@end

View File

@ -21,7 +21,7 @@
}
- (id)initWithPath:(NSString *)_path {
if (!_path) _path = [self tempfile];
if (!_path) _path = @"/tmp"; // I hate this
self = [super initWithWindowNibName:@"AtomWindow"];
path = [[_path stringByStandardizingPath] retain];
@ -62,15 +62,4 @@
return YES;
}
// Helper methods that should go elsewhere
- (NSString *)tempfile {
char *directory = "/tmp";
char *prefix = "temp-file";
char *tmpPath = tempnam(directory, prefix);
NSString *tmpPathString = [NSString stringWithUTF8String:tmpPath];
free(tmpPath);
return tmpPathString;
}
@end

View File

@ -46,6 +46,11 @@ static JSClassRef hashObjectClass = NULL;
static void throwException(JSContextRef ctx, JSValueRef* exception, NSString* reason);
BOOL isUsingStret(id argumentEncodings);
JSValueRef valueFromExternalContext(JSContextRef externalCtx, JSValueRef value, JSContextRef ctx);
void* getObjCCallAddress(id argumentEncodings);
JSValueRef boxedValueFromExternalContext(JSContextRef externalCtx, JSValueRef value, JSContextRef ctx);
// iPhone specifics
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0,

View File

@ -10,6 +10,8 @@
#import "JSCocoaController.h"
#include <sys/mman.h> // for mmap()
void closure_function(ffi_cif* cif, void* resp, void** args, void* userdata);
@implementation JSCocoaFFIClosure

View File

@ -102,7 +102,7 @@ void UKFileSubscriptionProc(FNMessage message, OptionBits flags, void *refcon
kNilOptions, &subscription );
if( err != noErr )
{
NSLog( @"UKFNSubscribeFileWatcher addPath: %@ failed due to error ID=%ld.", path, err );
NSLog( @"UKFNSubscribeFileWatcher addPath: %@ failed due to error ID=%d.", path, err );
return;
}

View File

@ -269,7 +269,7 @@ static UKKQueue * gUKKQueueSharedQueueSingleton = nil;
-(void) removePathFromQueue: (NSString*)path
{
int index = 0;
NSUInteger index = 0;
int fd = -1;
AT_SYNCHRONIZED( self )