qapi: fix qapi_dealloc_type_size parameter type
PATCH 1/1 qapi: fix qapi_dealloc_type_size parameter type
The second parameter to qapi_dealloc_type_size should be a uint64_t *, not a size_t *. This was causing our 32 bit x86 build to fail, since warnings are treated as errors.
--- qapi/qapi-dealloc-visitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
qapi/qapi-dealloc-visitor.c +1 -1
@@ -132,7 +132,7 @@ static void qapi_dealloc_type_number(Visitor *v, double *obj, const char *name, { } -static void qapi_dealloc_type_size (Visitor *v,size_t *obj,const char *name, +static void qapi_dealloc_type_size (Visitor *v,uint64_t *obj,const char *name,Error **errp) { }
Signature · 1 line
1.7.7
Quoted 5 lines · Bruce Rogers
The second parameter to
qapi_dealloc_type_sizeshould be auint64_t*, not asize_t*. This was causing our 32 bit x86 build to fail, since warnings are treated as errors.Signed-off-by Bruce Rogers <[email protected]>
Doh, I should've caught this in review. Yes, qapi's type generator uses uint64_t as the underlying type for 'size', and the visitor interface calls for uint64_t*, so that's what the implementation should use.
Quoted 20 lines
--- qapi/qapi-dealloc-visitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)qapi/qapi-dealloc-visitor.c +1
-1@@ -132,7 +132,7 @@ static void qapi_dealloc_type_number(Visitor *v, double *obj, const char *name, { } -static void qapi_dealloc_type_size (Visitor *v,size_t *obj,const char *name, +static void qapi_dealloc_type_size (Visitor *v,uint64_t *obj,const char *name,Error **errp) { }Signature · 1 line
1.7.7
Stefan Weil
Reviewed-byAm 27.11.2012 21:54, schrieb mdroth:
Quoted 11 lines · Bruce Rogers
Quoted 5 lines
The second parameter to
qapi_dealloc_type_sizeshould be auint64_t*, not asize_t*. This was causing our 32 bit x86 build to fail, since warnings are treated as errors.Signed-off-by Bruce Rogers <[email protected]>Doh, I should've caught this in review. Yes, qapi's type generator uses
uint64_tas the underlying type for 'size', and the visitor interface calls for uint64_t*, so that's what the implementation should use.Reviewed-by Michael Roth <[email protected]>
I have sent a similar patch this morning but just noticed that I forgot to cc qemu-devel. Only Stefan H. and Anthony got it :-(
Anthony, as Bruce' patch was already reviewed, please commit this one instead of my patch.
Quoted 20 lines
Quoted 20 lines
--- qapi/qapi-dealloc-visitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)qapi/qapi-dealloc-visitor.c +1
-1@@ -132,7 +132,7 @@ static void qapi_dealloc_type_number(Visitor *v, double *obj, const char *name, { } -static void qapi_dealloc_type_size (Visitor *v,size_t *obj,const char *name, +static void qapi_dealloc_type_size (Visitor *v,uint64_t *obj,const char *name,Error **errp) { }Signature · 1 line
1.7.7
Quoted 8 lines · Bruce Rogers
The second parameter to
qapi_dealloc_type_sizeshould be auint64_t*, not asize_t*. This was causing our 32 bit x86 build to fail, since warnings are treated as errors.Signed-off-by Bruce Rogers <[email protected]>--- qapi/qapi-dealloc-visitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Sorry for the broken build.