From patchwork Sun Dec 6 15:21:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 40426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0F5C0B7BEE for ; Mon, 7 Dec 2009 02:23:51 +1100 (EST) Received: from localhost ([127.0.0.1]:59086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHIxg-0007t5-3J for incoming@patchwork.ozlabs.org; Sun, 06 Dec 2009 10:23:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHIvZ-0006Uk-8f for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHIvU-0006Py-Je for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:36 -0500 Received: from [199.232.76.173] (port=57529 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHIvU-0006Ph-E8 for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:32 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:41164) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHIvT-0005IQ-P0 for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:32 -0500 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 2F4F713FE8AE8; Sun, 6 Dec 2009 16:21:31 +0100 (CET) Received: from [84.148.107.181] (helo=localhost.localdomain) by smtp06.web.de with asmtp (WEB.DE 4.110 #314) id 1NHIvR-0002Jd-00; Sun, 06 Dec 2009 16:21:29 +0100 From: Andreas Faerber To: qemu-devel@nongnu.org Date: Sun, 6 Dec 2009 16:21:22 +0100 Message-Id: <1260112882-1799-3-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1260112882-1799-2-git-send-email-andreas.faerber@web.de> References: <1260112882-1799-1-git-send-email-andreas.faerber@web.de> <1260112882-1799-2-git-send-email-andreas.faerber@web.de> X-Sender: Andreas.Faerber@web.de X-Provags-ID: V01U2FsdGVkX18btCyKprsh8JoZUGHOKf+4KLn+aPJREwiXGDes OYp4IHZH58sS+vTmZN0qKheBVX63tmgxhTamoXm9LqFK3EhZX7 wyJnRP2jo2Glm3oWm0Ww== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: John Arbuckle , Andreas Faerber , Mike Kronenberg Subject: [Qemu-devel] [PATCH v3 3/3] Cocoa: Silence warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Missing static for cocoa_keycode_to_qemu. Missing const for character constant. __LITTLE_ENDIAN__ is undefined on Big Endian host. MAC_OS_X_VERSION_10_4 is undefined on v10.3 and earlier. v3: - Silence warnings reported from Mac OS X v10.3.9 Signed-off-by: Andreas Faerber Cc: John Arbuckle Cc: Mike Kronenberg --- cocoa.m | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cocoa.m b/cocoa.m index 989efd5..ae2fd86 100644 --- a/cocoa.m +++ b/cocoa.m @@ -28,6 +28,9 @@ #include "console.h" #include "sysemu.h" +#ifndef MAC_OS_X_VERSION_10_4 +#define MAC_OS_X_VERSION_10_4 1040 +#endif #ifndef MAC_OS_X_VERSION_10_5 #define MAC_OS_X_VERSION_10_5 1050 #endif @@ -233,7 +236,7 @@ int keymap[] = */ }; -int cocoa_keycode_to_qemu(int keycode) +static int cocoa_keycode_to_qemu(int keycode) { if((sizeof(keymap)/sizeof(int)) <= keycode) { @@ -319,7 +322,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 @@ -791,7 +794,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 );