|
| From: | M. Warner Losh |
| Subject: | Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes |
| Date: | Mon, 11 Aug 2008 07:32:55 -0600 (MDT) |
In message: <address@hidden>
Samuel Thibault <address@hidden> writes:
: Gerd Hoffmann, le Mon 11 Aug 2008 09:52:03 +0200, a écrit :
: > > The warning is generated because the definition of "handler" should
: > > also describe the parameters and not use the old () style. But in this
: > > case, they can vary:
: > > static void do_help(const char *name)
: > > static void do_quit(void)
: > [ ... ]
: >
: > > I don't have a good plan how to fix this, proposals are welcome.
: > > Changing all handlers to use va_args to just silence a gcc warning
: > > sounds like overkill.
: >
: > Using a union maybe?
:
: That should be the right thing yes.
Except it becomes unmanageable over time... It also doesn't enhance
type safety...
Warner
| [Prev in Thread] | Current Thread | [Next in Thread] |