On Mon, Mar 7, 2011 at 1:53 PM, Anthony Liguori <anth...@codemonkey.ws> wrote: > On 03/07/2011 07:21 AM, Stefan Hajnoczi wrote: >> >> On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori<aligu...@us.ibm.com> >> wrote: >> >>> >>> diff --git a/qmp-core.h b/qmp-core.h >>> index e3235ec..5ce02f7 100644 >>> --- a/qmp-core.h >>> +++ b/qmp-core.h >>> @@ -21,10 +21,65 @@ typedef struct QmpState QmpState; >>> typedef void (QmpCommandFunc)(const QDict *, QObject **, Error **); >>> typedef void (QmpStatefulCommandFunc)(QmpState *qmp__sess, const QDict >>> *, QObject **, Error **); >>> >>> +typedef struct QmpSlot >>> +{ >>> + int handle; >>> + void *func; >>> >> >> This should be a void (*func)() > > Technically void (*)() is an obsolete type in standard C. > > I can switch to void (*)(void) but it requires casting and requires a > typeof() :-/
You're right, void (*)(void) is the proper form for a general function pointer. I think doing this in a portable way is worthwhile. Stefan