public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: qapi/
@ 2013-01-19  2:27 Doug Goldstein
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Goldstein @ 2013-01-19  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     b8ac01cbb804a7143069205374a94bb470b30f1d
Author:     Bruce Rogers <brogers <AT> suse <DOT> com>
AuthorDate: Tue Nov 27 20:11:25 2012 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 21:31:59 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=b8ac01cb

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.

Signed-off-by: Bruce Rogers <brogers <AT> suse.com>
Reviewed-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
Reviewed-by: Stefan Weil <sw <AT> weilnetz.de>
Signed-off-by: Luiz Capitulino <lcapitulino <AT> redhat.com>
(cherry picked from commit 1d16252652688a775b244fffa1b9ac9b719ceffc)

Signed-off-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
(cherry picked from commit ffffff01466a0180de7632842cf583c8a9cbf959)

---
 qapi/qapi-dealloc-visitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index a07b171..75214e7 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -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)
 {
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: qapi/
@ 2013-01-19  2:27 Doug Goldstein
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Goldstein @ 2013-01-19  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     edcf61fbcf0e6613e36c3968fc8a018b5f8ad803
Author:     Stefan Hajnoczi <stefanha <AT> redhat <DOT> com>
AuthorDate: Mon Nov 26 12:10:12 2012 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 21:31:59 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=edcf61fb

qapi: handle visitor->type_size() in QapiDeallocVisitor

visit_type_size() requires either visitor->type_size() or
visitor_uint64() to be implemented, otherwise a NULL function pointer is
invoked.

It is possible to trigger this crash as follows:

  $ qemu-system-x86_64 -netdev tap,sndbuf=0,id=netdev0 \
                       -device virtio-blk-pci,netdev=netdev0

The 'sndbuf' option has type "size".

Reviewed-by: Andreas Färber <afaerber <AT> suse.de>
Reviewed-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha <AT> redhat.com>
Signed-off-by: Anthony Liguori <aliguori <AT> us.ibm.com>
(cherry picked from commit 0c26f2eca40d6c65ea9edc62a10e510dc7f65cc8)

Signed-off-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
(cherry picked from commit 54c6c5a35d8bd57b320bbba8b85604018004bd13)

---
 qapi/qapi-dealloc-visitor.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index a154523..a07b171 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -132,6 +132,11 @@ 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,
+                                   Error **errp)
+{
+}
+
 static void qapi_dealloc_type_enum(Visitor *v, int *obj, const char *strings[],
                                    const char *kind, const char *name,
                                    Error **errp)
@@ -164,6 +169,7 @@ QapiDeallocVisitor *qapi_dealloc_visitor_new(void)
     v->visitor.type_bool = qapi_dealloc_type_bool;
     v->visitor.type_str = qapi_dealloc_type_str;
     v->visitor.type_number = qapi_dealloc_type_number;
+    v->visitor.type_size = qapi_dealloc_type_size;
 
     QTAILQ_INIT(&v->stack);
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-19  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-19  2:27 [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: qapi/ Doug Goldstein
  -- strict thread matches above, loose matches on Subject: below --
2013-01-19  2:27 Doug Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox