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 --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qom/object.c') diff --git a/qom/object.c b/qom/object.c index dd82287..523307d 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1070,7 +1070,7 @@ int64_t object_property_get_int(Object *obj, const char *name, } int object_property_get_enum(Object *obj, const char *name, - const char *strings[], Error **errp) + const char * const strings[], Error **errp) { StringOutputVisitor *sov; StringInputVisitor *siv; -- cgit v1.1