Am 08.05.2011 00:59, schrieb Alexander Graf:
Today's git failed building for me. It looks like a mismatching function
prototype definition.

This patch fixes compilation of arm-softmmu for me.

Signed-off-by: Alexander Graf <ag...@suse.de>
---
hw/usb-musb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index b30caeb..85a2b6f 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -261,7 +261,7 @@

static void musb_attach(USBPort *port);
static void musb_detach(USBPort *port);
-static void musb_schedule_cb(USBDevice *dev, USBPacket *p);
+static inline void musb_schedule_cb(USBDevice *dev, USBPacket *p);

static USBPortOps musb_port_ops = {
.attach = musb_attach,

The patch fixes the warning, because now forward declaration and
function definition match, but it's not the correct approach.

Instead of adding 'inline' here, 'inline' should be removed from the definition. The function musb_schedule_cb is used via a function pointer, so it is never inline.

Regards,
Stefan W.


Reply via email to