qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, armbru@redhat.com,
	Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v10 22/25] qapi: Tighten qmp_input_end_list()
Date: Fri, 29 Jan 2016 06:48:58 -0700	[thread overview]
Message-ID: <1454075341-13658-23-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1454075341-13658-1-git-send-email-eblake@redhat.com>

The only way that qmp_input_pop() will set errp is if a dictionary
was the most recent thing pushed.  Since we don't have any
push(struct)/pop(list) or push(list)/pop(struct) mismatches (such
a mismatch is a programming bug), we therefore cannot set errp
inside qmp_input_end_list().  Make this obvious by
using &error_abort.  A later patch will then remove the errp
parameter of qmp_input_pop(), but that will first require the
larger task of splitting visit_end_struct().

Signed-off-by: Eric Blake <eblake@redhat.com>

---
v10: new patch, split out from 18/37
---
 qapi/qmp-input-visitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index bf25249..ce3c0d6 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -205,7 +205,7 @@ static void qmp_input_end_list(Visitor *v, Error **errp)
 {
     QmpInputVisitor *qiv = to_qiv(v);

-    qmp_input_pop(qiv, errp);
+    qmp_input_pop(qiv, &error_abort);
 }

 static void qmp_input_get_next_type(Visitor *v, const char *name, QType *type,
-- 
2.5.0

  parent reply	other threads:[~2016-01-29 13:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 13:48 [Qemu-devel] [PATCH v10 00/25] qapi visitor cleanups part 1 (post-introspection cleanups subset E) Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 01/25] qobject: Document more shortcomings in our number handling Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 02/25] qapi: Avoid use of misnamed DO_UPCAST() Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 03/25] qapi: Drop dead dealloc visitor variable Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 04/25] qapi: Dealloc visitor does not need a type_size() Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 05/25] qapi: Drop dead parameter in gen_params() Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 06/25] hmp: Drop pointless allocation during qapi visit Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 07/25] hmp: Cache use of qapi visitor Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 08/25] vl: Ensure qapi visitor properly ends struct visit Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 09/25] balloon: Improve use of qapi visitor Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 10/25] qapi: Improve generated event " Eric Blake
2016-02-01 12:31   ` Markus Armbruster
2016-02-01 22:50     ` Eric Blake
2016-02-02  7:52       ` Markus Armbruster
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 11/25] qapi: Track all failures between visit_start/stop Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 12/25] qapi-visit: Kill unused visit_end_union() Eric Blake
2016-02-01 12:38   ` Markus Armbruster
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 13/25] qapi: Prefer type_int64 over type_int in visitors Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 14/25] qapi: Make all visitors supply uint64 callbacks Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 15/25] qapi: Consolidate visitor small integer callbacks Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 16/25] qapi: Don't cast Enum* to int* Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 17/25] qom: Use typedef for Visitor Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 18/25] qapi: Swap visit_* arguments for consistent 'name' placement Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 19/25] qom: Swap 'name' next to visitor in ObjectPropertyAccessor Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 20/25] qapi: Swap 'name' in visit_* callbacks to match public API Eric Blake
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 21/25] qapi: Drop unused 'kind' for struct/enum visit Eric Blake
2016-02-01 12:56   ` Markus Armbruster
2016-01-29 13:48 ` Eric Blake [this message]
2016-01-29 13:48 ` [Qemu-devel] [PATCH v10 23/25] qapi: Drop unused error argument for list and implicit struct Eric Blake
2016-02-01 13:07   ` Markus Armbruster
2016-02-01 17:22     ` Eric Blake
2016-02-01 23:14     ` Eric Blake
2016-02-02  9:00       ` Markus Armbruster
2016-01-29 13:49 ` [Qemu-devel] [PATCH v10 24/25] qmp: Fix reference-counting of qnull on empty output visit Eric Blake
2016-01-29 13:49 ` [Qemu-devel] [PATCH v10 25/25] qmp: Don't abuse stack to track qmp-output root Eric Blake
2016-02-01 13:25 ` [Qemu-devel] [PATCH v10 00/25] qapi visitor cleanups part 1 (post-introspection cleanups subset E) Markus Armbruster
2016-02-02  9:55   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454075341-13658-23-git-send-email-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).