summaryrefslogtreecommitdiffstats
path: root/include/qom
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-05-13 17:14:07 +0100
committerAndreas Färber <afaerber@suse.de>2015-06-19 18:42:18 +0200
commit2e4450ff432daef524cb3557fca68a3b7b5c7823 (patch)
treec900fd8fbef7456b29aaefdc20e91063abcbb3a0 /include/qom
parenta31bdae5a76ecc060c1eb8a66be1896072c1e8b2 (diff)
downloadhqemu-2e4450ff432daef524cb3557fca68a3b7b5c7823.zip
hqemu-2e4450ff432daef524cb3557fca68a3b7b5c7823.tar.gz
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/qom')
-rw-r--r--include/qom/object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 018e27e..701b4c5 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -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:
OpenPOWER on IntegriCloud