diff options
author | Daniel P. Berrange | 2015-05-13 18:14:07 +0200 |
---|---|---|
committer | Andreas Färber | 2015-06-19 18:42:18 +0200 |
commit | 2e4450ff432daef524cb3557fca68a3b7b5c7823 (patch) | |
tree | c900fd8fbef7456b29aaefdc20e91063abcbb3a0 /include/qapi/visitor-impl.h | |
parent | qom: Add object_new_with_props() / object_new_withpropv() helpers (diff) | |
download | qemu-2e4450ff432daef524cb3557fca68a3b7b5c7823.tar.gz qemu-2e4450ff432daef524cb3557fca68a3b7b5c7823.tar.xz qemu-2e4450ff432daef524cb3557fca68a3b7b5c7823.zip |
qom: Make enum string tables const-correct
The enum string table parameters in various QOM/QAPI methods
are declared 'const char *strings[]'. This results in const
warnings if passed a variable that was declared as
static const char * const strings[] = { .... };
Add the extra const annotation to the parameters, since
neither the string elements, nor the array itself should
ever be modified.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qapi/visitor-impl.h')
-rw-r--r-- | include/qapi/visitor-impl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h index 09bb0fd408..f4a2f746c8 100644 --- a/include/qapi/visitor-impl.h +++ b/include/qapi/visitor-impl.h @@ -30,7 +30,7 @@ struct Visitor GenericList *(*next_list)(Visitor *v, GenericList **list, Error **errp); void (*end_list)(Visitor *v, Error **errp); - void (*type_enum)(Visitor *v, int *obj, const char *strings[], + void (*type_enum)(Visitor *v, int *obj, const char * const strings[], const char *kind, const char *name, Error **errp); void (*get_next_type)(Visitor *v, int *kind, const int *qobjects, const char *name, Error **errp); @@ -59,9 +59,9 @@ struct Visitor void (*end_union)(Visitor *v, bool data_present, Error **errp); }; -void input_type_enum(Visitor *v, int *obj, const char *strings[], +void input_type_enum(Visitor *v, int *obj, const char * const strings[], const char *kind, const char *name, Error **errp); -void output_type_enum(Visitor *v, int *obj, const char *strings[], +void output_type_enum(Visitor *v, int *obj, const char * const strings[], const char *kind, const char *name, Error **errp); #endif |