From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37005 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuMoW-0003So-3s for qemu-devel@nongnu.org; Sat, 11 Sep 2010 05:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuMoV-000742-0a for qemu-devel@nongnu.org; Sat, 11 Sep 2010 05:56:03 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:34199) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuMoU-00073p-MP for qemu-devel@nongnu.org; Sat, 11 Sep 2010 05:56:02 -0400 Received: from smtp05.web.de ( [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id 296AE167ED65E for ; Sat, 11 Sep 2010 11:56:01 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 11 Sep 2010 11:55:55 +0200 Message-Id: <1284198955-11234-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: andreas.faerber@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] Cocoa: Avoid missing prototype warnings for qemu_main List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= In vl.c main is redefined to qemu_main but no prototype is available. Move it into qemu-common.h since it is needed in ui/cocoa.m, too. Adjust the call sites to the signature used in vl.c. Signed-off-by: Andreas F=C3=A4rber --- qemu-common.h | 4 ++++ ui/cocoa.m | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index dfd3dc0..f8ce3ce 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -13,6 +13,10 @@ =20 #define QEMU_BUILD_BUG_ON(x) typedef char __build_bug_on__##__LINE__[(x)= ?-1:1]; =20 +#ifdef CONFIG_COCOA +int qemu_main(int argc, char** argv, char** envp); +#endif + typedef struct QEMUTimer QEMUTimer; typedef struct QEMUFile QEMUFile; typedef struct QEMUBH QEMUBH; diff --git a/ui/cocoa.m b/ui/cocoa.m index 56c789a..d7deb0e 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -61,7 +61,6 @@ typedef struct { int bitsPerPixel; } QEMUScreen; =20 -int qemu_main(int argc, char **argv); // main defined in qemu/vl.c NSWindow *normalWindow; id cocoaView; static DisplayChangeListener *dcl; @@ -794,7 +793,7 @@ static int cocoa_keycode_to_qemu(int keycode) COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n"); =20 int status; - status =3D qemu_main(argc, argv); + status =3D qemu_main(argc, argv, NULL); exit(status); } =20 @@ -868,7 +867,7 @@ int main (int argc, const char * argv[]) { if (!strcmp(argv[i], "-vnc") || !strcmp(argv[i], "-nographic") || !strcmp(argv[i], "-curses")) { - return qemu_main(gArgc, gArgv); + return qemu_main(gArgc, gArgv, NULL); } } =20 --=20 1.7.0.4