[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 5/7] qom: make enum string tables const-corre
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v3 5/7] qom: make enum string tables const-correct |
Date: |
Fri, 08 May 2015 19:19:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Am 01.05.2015 um 12:30 schrieb Daniel P. Berrange:
> 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 <address@hidden>
> ---
> include/hw/qdev-core.h | 2 +-
> include/qapi/util.h | 2 +-
> include/qapi/visitor-impl.h | 6 +++---
> include/qapi/visitor.h | 2 +-
> include/qom/object.h | 2 +-
> qapi/qapi-dealloc-visitor.c | 3 ++-
> qapi/qapi-util.c | 2 +-
> qapi/qapi-visit-core.c | 6 +++---
> qom/object.c | 2 +-
> scripts/qapi-types.py | 4 ++--
> 10 files changed, 16 insertions(+), 15 deletions(-)
Reviewed-by: Andreas Färber <address@hidden>
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
- Re: [Qemu-devel] [PATCH v3 3/7] qom: create objects in two phases, (continued)
[Qemu-devel] [PATCH v3 4/7] qom: add object_new_propv / object_new_proplist constructors, Daniel P. Berrange, 2015/05/01
[Qemu-devel] [PATCH v3 5/7] qom: make enum string tables const-correct, Daniel P. Berrange, 2015/05/01
- Re: [Qemu-devel] [PATCH v3 5/7] qom: make enum string tables const-correct,
Andreas Färber <=
[Qemu-devel] [PATCH v3 6/7] qom: add a object_property_add_enum helper method, Daniel P. Berrange, 2015/05/01
[Qemu-devel] [PATCH v3 7/7] qom: don't pass string table to object_get_enum method, Daniel P. Berrange, 2015/05/01
Re: [Qemu-devel] [PATCH v3 0/7] qom: misc fixes & enhancements to support TLS work, Paolo Bonzini, 2015/05/05