mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qapi: Drop unused 'kind' for struct/enum visit
visit_start_struct() and visit_type_enum() had a 'kind' argument that was usually set to either the stringized version of the corresponding qapi type name, or to NULL (although some clients didn't even get that right). But nothing ever used the argument. It's even hard to argue that it would be useful in a debugger, as a stack backtrace also tells which type is being visited. Therefore, drop the 'kind' argument as dead. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1454075341-13658-22-git-send-email-eblake@redhat.com> [Harmless rebase mistake cleaned up] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
0b2a0d6bb2
commit
337283dffb
15 changed files with 36 additions and 48 deletions
|
@ -20,9 +20,9 @@
|
|||
#include "qapi/visitor-impl.h"
|
||||
|
||||
void visit_start_struct(Visitor *v, const char *name, void **obj,
|
||||
const char *kind, size_t size, Error **errp)
|
||||
size_t size, Error **errp)
|
||||
{
|
||||
v->start_struct(v, name, obj, kind, size, errp);
|
||||
v->start_struct(v, name, obj, size, errp);
|
||||
}
|
||||
|
||||
void visit_end_struct(Visitor *v, Error **errp)
|
||||
|
@ -85,10 +85,9 @@ void visit_get_next_type(Visitor *v, const char *name, QType *type,
|
|||
}
|
||||
|
||||
void visit_type_enum(Visitor *v, const char *name, int *obj,
|
||||
const char *const strings[], const char *kind,
|
||||
Error **errp)
|
||||
const char *const strings[], Error **errp)
|
||||
{
|
||||
v->type_enum(v, name, obj, strings, kind, errp);
|
||||
v->type_enum(v, name, obj, strings, errp);
|
||||
}
|
||||
|
||||
void visit_type_int(Visitor *v, const char *name, int64_t *obj, Error **errp)
|
||||
|
@ -222,8 +221,7 @@ void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp)
|
|||
}
|
||||
|
||||
void output_type_enum(Visitor *v, const char *name, int *obj,
|
||||
const char *const strings[], const char *kind,
|
||||
Error **errp)
|
||||
const char *const strings[], Error **errp)
|
||||
{
|
||||
int i = 0;
|
||||
int value = *obj;
|
||||
|
@ -241,8 +239,7 @@ void output_type_enum(Visitor *v, const char *name, int *obj,
|
|||
}
|
||||
|
||||
void input_type_enum(Visitor *v, const char *name, int *obj,
|
||||
const char *const strings[], const char *kind,
|
||||
Error **errp)
|
||||
const char *const strings[], Error **errp)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
int64_t value = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue