All of lore.kernel.org
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"John Snow" <jsnow@redhat.com>,
	"Xie Yongji" <xieyongji@bytedance.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH v3 09/16] scripts/qapi: add required system includes to visitor
Date: Wed, 10 Aug 2022 16:48:50 +0400	[thread overview]
Message-ID: <20220810124857.1360211-10-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20220810124857.1360211-1-marcandre.lureau@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The generated visitor code includes abort() & assert(), we shouldn't
rely on the global "-i" headers to include the necessary system headers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
---
 scripts/qapi/visit.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py
index 1ff464c036..4aba5ddd8a 100644
--- a/scripts/qapi/visit.py
+++ b/scripts/qapi/visit.py
@@ -342,6 +342,8 @@ def _begin_user_module(self, name: str) -> None:
         visit = self._module_basename('qapi-visit', name)
         self._genc.preamble_add(mcgen('''
 %(include)s
+#include <assert.h>
+#include <stdlib.h>
 
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
-- 
2.37.1



  parent reply	other threads:[~2022-08-10 13:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 12:48 [PATCH v3 00/16] Preliminary patches for subproject split marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 01/16] error-report: misc comment fix marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 02/16] error-report: introduce "detailed" variable marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 03/16] error-report: simplify print_loc() marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 04/16] error-report: introduce overridable error_is_detailed() marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp() marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 06/16] qapi: move QEMU-specific dispatch code in monitor marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 07/16] qapi: remove QEMU-specific monitor dependency from dispatch marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 08/16] scripts/qapi-gen: add -i option marcandre.lureau
2022-08-10 12:48 ` marcandre.lureau [this message]
2022-08-10 12:48 ` [PATCH v3 10/16] util: move 256-by-128 division helpers to int128 marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 11/16] qemu-common: introduce a common subproject marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 12/16] qemu-common: move scripts/qapi marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 13/16] qemu-common: move glib-compat.h marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 14/16] qemu-common: move error-report marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 15/16] mtest2make.py: teach suite name that are just "PROJECT" marcandre.lureau
2022-08-10 12:48 ` [PATCH v3 16/16] qemu-common: add error-report test marcandre.lureau

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=20220810124857.1360211-10-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=crosa@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xieyongji@bytedance.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.