Skip to contentSkip to conversation

fix prototypes in qemu posix code

PATCH In review Jes Sorensen 2 participants 2 messages Sep 5, 2008 – Sep 7, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix prototypes in qemu posix code

Hi,

Small patch to eliminate some compiler warnings.

Cheers,
Jes

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

---
 qemu/block-raw-posix.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
qemu/block-raw-posix.c +4 -4
Index: 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>
#1 lore raw
Quoted 9 lines · Jes Sorensen

Hi,

Small patch to eliminate some compiler warnings.

Cheers,
Jes
#include "exec-all.h"
#else
#define kvm_enabled() 0

qemu/block-raw-posix.c line 34

Quoted 8 lines
qemu/block-raw-posix.c +4 -4
-#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.

Signature · 1 line
error compiling committee.c: too many arguments to function