public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix prototypes in qemu posix code
@ 2008-09-05 13:49 Jes Sorensen
  2008-09-07  6:31 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Jes Sorensen @ 2008-09-05 13:49 UTC (permalink / raw)
  To: Avi Kivity, kvm

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

Hi,

Small patch to eliminate some compiler warnings.

Cheers,
Jes

[-- Attachment #2: 0101-qemu-missing-protos.patch --]
[-- Type: text/plain, Size: 919 bytes --]

Add missing prototypes for qemu_kvm_aio_wait_{start,end}. Fix dummy
macro declarations and remove unused qemu_kvm_aio_{start,end}

Signed-off-by: Jes Sorensen <jes@sgi.com>

---
 qemu/block-raw-posix.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: kvm-userspace.git/qemu/block-raw-posix.c
===================================================================
--- kvm-userspace.git.orig/qemu/block-raw-posix.c
+++ kvm-userspace.git/qemu/block-raw-posix.c
@@ -28,10 +28,10 @@
 #include "exec-all.h"
 #else
 #define kvm_enabled() 0
-#define qemu_kvm_aio_start() ((void)0)
-#define qemu_kvm_aio_end() ((void)0)
-#define qemu_kvm_aio_wait() ((void)0)
-#define qemu_kvm_aio_poll() ((void)0)
+#define qemu_kvm_aio_wait()	do{}while(0)
+#define qemu_kvm_aio_poll()	do{}while(0)
+void qemu_kvm_aio_wait_start(void);
+void qemu_kvm_aio_wait_end(void);
 #endif
 #include "block_int.h"
 #include <assert.h>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] fix prototypes in qemu posix code
  2008-09-05 13:49 [patch] fix prototypes in qemu posix code Jes Sorensen
@ 2008-09-07  6:31 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-09-07  6:31 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: kvm

Jes Sorensen wrote:
> Hi,
>
> Small patch to eliminate some compiler warnings.
>
> Cheers,
> Jes
>  #include "exec-all.h"
>  #else
>  #define kvm_enabled() 0
> -#define qemu_kvm_aio_start() ((void)0)
> -#define qemu_kvm_aio_end() ((void)0)
> -#define qemu_kvm_aio_wait() ((void)0)
> -#define qemu_kvm_aio_poll() ((void)0)
> +#define qemu_kvm_aio_wait()	do{}while(0)
> +#define qemu_kvm_aio_poll()	do{}while(0)
> +void qemu_kvm_aio_wait_start(void);
> +void qemu_kvm_aio_wait_end(void);

Better to have this as an inline function; that's the best way to avoid 
misuse.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-07  6:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05 13:49 [patch] fix prototypes in qemu posix code Jes Sorensen
2008-09-07  6:31 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox