mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
committed by
Andreas Färber
parent
a31bdae5a7
commit
2e4450ff43
@@ -1081,7 +1081,7 @@ int64_t object_property_get_int(Object *obj, const char *name,
|
||||
* an enum).
|
||||
*/
|
||||
int object_property_get_enum(Object *obj, const char *name,
|
||||
const char *strings[], Error **errp);
|
||||
const char * const strings[], Error **errp);
|
||||
|
||||
/**
|
||||
* object_property_get_uint16List:
|
||||
|
||||
Reference in New Issue
Block a user