From 2e4450ff432daef524cb3557fca68a3b7b5c7823 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 13 May 2015 17:14:07 +0100 Subject: qom: Make enum string tables const-correct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Eric Blake Signed-off-by: Andreas Färber --- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/qom') 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: -- cgit v1.1