From e688df6bc4549f28534cdb001f168b8caae55b0c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:31 +0100 Subject: Include qapi/error.h exactly where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed] --- tests/check-qlist.c | 1 - tests/check-qnum.c | 1 - tests/io-channel-helpers.c | 1 - tests/test-aio-multithread.c | 1 - tests/test-qmp-commands.c | 1 + tests/test-qmp-event.c | 1 + tests/test-x86-cpuid-compat.c | 1 - 7 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/check-qlist.c b/tests/check-qlist.c index 894e991..259980d 100644 --- a/tests/check-qlist.c +++ b/tests/check-qlist.c @@ -11,7 +11,6 @@ */ #include "qemu/osdep.h" -#include "qapi/error.h" #include "qapi/qmp/qnum.h" #include "qapi/qmp/qlist.h" diff --git a/tests/check-qnum.c b/tests/check-qnum.c index d702d5d..2b667f7 100644 --- a/tests/check-qnum.c +++ b/tests/check-qnum.c @@ -15,7 +15,6 @@ #include "qemu/osdep.h" #include "qapi/qmp/qnum.h" -#include "qapi/error.h" #include "qemu-common.h" /* diff --git a/tests/io-channel-helpers.c b/tests/io-channel-helpers.c index 5430e13..ab988ef 100644 --- a/tests/io-channel-helpers.c +++ b/tests/io-channel-helpers.c @@ -20,7 +20,6 @@ #include "qemu/osdep.h" #include "io-channel-helpers.h" -#include "qapi/error.h" #include "qemu/iov.h" struct QIOChannelTest { diff --git a/tests/test-aio-multithread.c b/tests/test-aio-multithread.c index c8bec81..6440d54 100644 --- a/tests/test-aio-multithread.c +++ b/tests/test-aio-multithread.c @@ -12,7 +12,6 @@ #include "qemu/osdep.h" #include "block/aio.h" -#include "qapi/error.h" #include "qemu/coroutine.h" #include "qemu/thread.h" #include "qemu/error-report.h" diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c index 904c89d..52c1802 100644 --- a/tests/test-qmp-commands.c +++ b/tests/test-qmp-commands.c @@ -2,6 +2,7 @@ #include "qemu-common.h" #include "qapi/qmp/types.h" #include "test-qmp-commands.h" +#include "qapi/error.h" #include "qapi/qmp/dispatch.h" #include "qemu/module.h" #include "qapi/qobject-input-visitor.h" diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c index 46825b4..5be2d8e 100644 --- a/tests/test-qmp-event.c +++ b/tests/test-qmp-event.c @@ -16,6 +16,7 @@ #include "qemu-common.h" #include "test-qapi-visit.h" #include "test-qapi-event.h" +#include "qapi/error.h" #include "qapi/qmp/types.h" #include "qapi/qmp/qobject.h" #include "qapi/qmp-event.h" diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c index 58a2dd9..c594b5b 100644 --- a/tests/test-x86-cpuid-compat.c +++ b/tests/test-x86-cpuid-compat.c @@ -1,6 +1,5 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qnum.h" #include "qapi/qmp/qbool.h" -- cgit v1.1