Missing static for cocoa_keycode_to_qemu. Missing const for character constant.
__LITTLE_ENDIAN__ is undefined on Big Endian host. Signed-off-by: Andreas Faerber <andreas.faer...@web.de> Cc: John Arbuckle <programmingk...@gmail.com> --- cocoa.m | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocoa.m b/cocoa.m index 7062571..05f507d 100644 --- a/cocoa.m +++ b/cocoa.m @@ -229,7 +229,7 @@ int keymap[] = */ }; -int cocoa_keycode_to_qemu(int keycode) +static int cocoa_keycode_to_qemu(int keycode) { if((sizeof(keymap)/sizeof(int)) <= keycode) { @@ -315,7 +315,7 @@ int cocoa_keycode_to_qemu(int keycode) screen.bitsPerComponent, //bitsPerComponent screen.bitsPerPixel, //bitsPerPixel (screen.width * (screen.bitsPerComponent/2)), //bytesPerRow -#if __LITTLE_ENDIAN__ +#ifdef __LITTLE_ENDIAN__ CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorspace for OS X >= 10.4 kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, #else @@ -783,7 +783,7 @@ int cocoa_keycode_to_qemu(int keycode) if(returnCode == NSCancelButton) { exit(0); } else if(returnCode == NSOKButton) { - char *bin = "qemu"; + const char *bin = "qemu"; char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; char **argv = (char**)malloc( sizeof(char*)*3 ); -- 1.6.5.3