[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmis
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes |
Date: |
Mon, 11 Aug 2008 09:52:03 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080723) |
Blue Swirl wrote:
> On 8/9/08, Anthony Liguori <address@hidden> wrote:
>> As long as the plan is to fix all of those warnings, I think it's a good
>> idea.
>
> The extra unfixed warning comes from monitor.c:
> typedef struct term_cmd_t {
> const char *name;
> const char *args_type;
> void (*handler)();
> const char *params;
> const char *help;
> } term_cmd_t;
>
> 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?
typedef struct term_cmd_t {
[ ... ]
union {
void (*help)(const char name);
void (*quit)(void);
[ ... ]
} handlers;
[ ... ]
};
cheers,
Gerd
--
http://kraxel.fedorapeople.org/xenner/
- [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Blue Swirl, 2008/08/08
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Anthony Liguori, 2008/08/09
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Blue Swirl, 2008/08/10
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes,
Gerd Hoffmann <=
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Samuel Thibault, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, M. Warner Losh, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, M. Warner Losh, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Anthony Liguori, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Avi Kivity, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Paul Brook, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Laurent Vivier, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Anthony Liguori, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Avi Kivity, 2008/08/11
- Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes, Anthony Liguori, 2008/08/11