From: Stefan Weil <weil@mail.berlios.de>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Cocoa: Avoid missing prototype warnings for qemu_main
Date: Sat, 11 Sep 2010 15:26:27 +0200 [thread overview]
Message-ID: <4C8B8383.4010503@mail.berlios.de> (raw)
In-Reply-To: <1284198955-11234-1-git-send-email-andreas.faerber@web.de>
Am 11.09.2010 11:55, schrieb Andreas Färber:
> 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ärber<andreas.faerber@web.de>
> ---
> 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 @@
>
> #define QEMU_BUILD_BUG_ON(x) typedef char __build_bug_on__##__LINE__[(x)?-1:1];
>
> +#ifdef CONFIG_COCOA
> +int qemu_main(int argc, char** argv, char** envp);
> +#endif
> +
>
Is this conditional compilation needed here, or
could qemu_main be declared unconditionally?
> 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;
>
> -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");
>
> int status;
> - status = qemu_main(argc, argv);
> + status = qemu_main(argc, argv, NULL);
> exit(status);
> }
>
> @@ -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);
> }
> }
>
>
next prev parent reply other threads:[~2010-09-11 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 9:55 [Qemu-devel] [PATCH] Cocoa: Avoid missing prototype warnings for qemu_main Andreas Färber
2010-09-11 13:26 ` Stefan Weil [this message]
2010-09-11 14:20 ` Andreas Färber
2010-09-19 9:36 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C8B8383.4010503@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=andreas.faerber@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).