diff mbox

[39/50] gdbstub: remove includes from gdbstub-xml.c

Message ID 1460147350-7601-40-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini April 8, 2016, 8:28 p.m. UTC
gdbstub-xml.c defines a bunch of arrays of strings; there is no
need to include anything.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/feature_to_c.sh | 3 ---
 1 file changed, 3 deletions(-)

Comments

Markus Armbruster April 18, 2016, 1:54 p.m. UTC | #1
Paolo Bonzini <pbonzini@redhat.com> writes:

> gdbstub-xml.c defines a bunch of arrays of strings; there is no
> need to include anything.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  scripts/feature_to_c.sh | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/scripts/feature_to_c.sh b/scripts/feature_to_c.sh
> index fb1f336..0994d95 100644
> --- a/scripts/feature_to_c.sh
> +++ b/scripts/feature_to_c.sh
> @@ -36,9 +36,6 @@ for input; do
>    arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`
>  
>    ${AWK:-awk} 'BEGIN { n = 0
> -      printf "#include \"qemu/osdep.h\"\n"
> -      printf "#include \"qemu-common.h\"\n"
> -      printf "#include \"exec/gdbstub.h\"\n"
>        print "static const char '$arrayname'[] = {"
>        for (i = 0; i < 255; i++)
>          _ord_[sprintf("%c", i)] = i

We might want to include osdep.h anyway, just to avoid adding an
exception to the rule "any C file must include qemu/osdep.h first."
Peter Maydell April 18, 2016, 2:12 p.m. UTC | #2
On 18 April 2016 at 14:54, Markus Armbruster <armbru@redhat.com> wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> gdbstub-xml.c defines a bunch of arrays of strings; there is no
>> need to include anything.

> We might want to include osdep.h anyway, just to avoid adding an
> exception to the rule "any C file must include qemu/osdep.h first."

Yes, I think we should be consistent there.

thanks
-- PMM
diff mbox

Patch

diff --git a/scripts/feature_to_c.sh b/scripts/feature_to_c.sh
index fb1f336..0994d95 100644
--- a/scripts/feature_to_c.sh
+++ b/scripts/feature_to_c.sh
@@ -36,9 +36,6 @@  for input; do
   arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`
 
   ${AWK:-awk} 'BEGIN { n = 0
-      printf "#include \"qemu/osdep.h\"\n"
-      printf "#include \"qemu-common.h\"\n"
-      printf "#include \"exec/gdbstub.h\"\n"
       print "static const char '$arrayname'[] = {"
       for (i = 0; i < 255; i++)
         _ord_[sprintf("%c", i)] = i