From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Michael Roth" <michael.roth@amd.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH-for-9.1?] qapi/util: Include missing 'qapi/error.h' header
Date: Tue, 6 Aug 2024 14:41:38 +0200 [thread overview]
Message-ID: <20240806124138.90636-1-philmd@linaro.org> (raw)
qapi_enum_parse() uses the Error type which is
declared in "qapi/error.h". Include "qapi/error.h"
in order to avoid:
include/qapi/util.h:27:30: error: unknown type name 'Error'
int def, Error **errp);
^
Note we include it after the QEnumLookup declaration
to avoid:
In file included from include/qapi/error.h:275:
qapi/qapi-types-error.h:30:14: error: unknown type name 'QEnumLookup'
extern const QEnumLookup QapiErrorClass_lookup;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/qapi/util.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/qapi/util.h b/include/qapi/util.h
index b8254247b8..568f31ac9e 100644
--- a/include/qapi/util.h
+++ b/include/qapi/util.h
@@ -22,6 +22,8 @@ typedef struct QEnumLookup {
const int size;
} QEnumLookup;
+#include "qapi/error.h"
+
const char *qapi_enum_lookup(const QEnumLookup *lookup, int val);
int qapi_enum_parse(const QEnumLookup *lookup, const char *buf,
int def, Error **errp);
--
2.45.2
next reply other threads:[~2024-08-06 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 12:41 Philippe Mathieu-Daudé [this message]
2024-08-06 14:32 ` [PATCH-for-9.1?] qapi/util: Include missing 'qapi/error.h' header Richard Henderson
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=20240806124138.90636-1-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=michael.roth@amd.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).