* [Qemu-devel] [PATCH] monitor: Add missing attributes to local function
@ 2013-08-22 19:30 Stefan Weil
2013-08-26 15:48 ` Luiz Capitulino
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-08-22 19:30 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: Stefan Weil, Luiz Capitulino
Function expr_error gets a format string and variable arguments like printf.
It also never returns. Add the necessary attributes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index da9c9a2..6413d44 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3171,7 +3171,8 @@ static const MonitorDef monitor_defs[] = {
{ NULL },
};
-static void expr_error(Monitor *mon, const char *fmt, ...)
+static void GCC_FMT_ATTR(2, 3) QEMU_NORETURN
+expr_error(Monitor *mon, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor: Add missing attributes to local function
2013-08-22 19:30 [Qemu-devel] [PATCH] monitor: Add missing attributes to local function Stefan Weil
@ 2013-08-26 15:48 ` Luiz Capitulino
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Capitulino @ 2013-08-26 15:48 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
On Thu, 22 Aug 2013 21:30:09 +0200
Stefan Weil <sw@weilnetz.de> wrote:
> Function expr_error gets a format string and variable arguments like printf.
> It also never returns. Add the necessary attributes.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Applied to the qmp branch, thanks.
> ---
> monitor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/monitor.c b/monitor.c
> index da9c9a2..6413d44 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -3171,7 +3171,8 @@ static const MonitorDef monitor_defs[] = {
> { NULL },
> };
>
> -static void expr_error(Monitor *mon, const char *fmt, ...)
> +static void GCC_FMT_ATTR(2, 3) QEMU_NORETURN
> +expr_error(Monitor *mon, const char *fmt, ...)
> {
> va_list ap;
> va_start(ap, fmt);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-26 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 19:30 [Qemu-devel] [PATCH] monitor: Add missing attributes to local function Stefan Weil
2013-08-26 15:48 ` Luiz Capitulino
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).