Patchwork [STABLE] qapi: fix build issue due to missing newline in generated header

login
register
mail settings
Submitter Michael Roth
Date Aug. 10, 2011, 6:10 p.m.
Message ID <1312999851-28390-1-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/109418/
State New
Headers show

Comments

Michael Roth - Aug. 10, 2011, 6:10 p.m.
Fixes a build issue on RHEL5, and potentially other distros, where gcc
will generate an error due to us not writing a trailing "\n" when
generating *qmp-commands.h

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 scripts/qapi-commands.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Anthony Liguori - Aug. 12, 2011, 1:45 p.m.
On 08/10/2011 01:10 PM, Michael Roth wrote:
> Fixes a build issue on RHEL5, and potentially other distros, where gcc
> will generate an error due to us not writing a trailing "\n" when
> generating *qmp-commands.h
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>

Applied to master.  Thanks.

Regards,

Anthony Liguori

> ---
>   scripts/qapi-commands.py |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
> index 9ad4c54..bf61740 100644
> --- a/scripts/qapi-commands.py
> +++ b/scripts/qapi-commands.py
> @@ -375,7 +375,7 @@ if dispatch_type == "sync":
>           ret = gen_marshal_input(cmd['command'], arglist, ret_type) + "\n"
>           fdef.write(ret)
>
> -    fdecl.write("\n#endif");
> +    fdecl.write("\n#endif\n");
>       ret = gen_registry(commands)
>       fdef.write(ret)
>

Patch

diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 9ad4c54..bf61740 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -375,7 +375,7 @@  if dispatch_type == "sync":
         ret = gen_marshal_input(cmd['command'], arglist, ret_type) + "\n"
         fdef.write(ret)
 
-    fdecl.write("\n#endif");
+    fdecl.write("\n#endif\n");
     ret = gen_registry(commands)
     fdef.write(ret)