Skip to contentSkip to conversation

monitor: Add missing attributes to local function

PATCH Applied Stefan Weil 2 participants 2 messages Aug 22, 2013 – Aug 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 monitor: Add missing attributes to local function

Function expr_error gets a format string and variable arguments like printf. It also never returns. Add the necessary attributes.

---
 monitor.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
monitor.c +2 -1
index da9c9a2..6413d44 100644
@@ -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);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · On Thu, 22 Aug 2013 21:30:09 +0200 Stefan Weil <[email protected]> wrote:

Function expr_error gets a format string and variable arguments like printf. It also never returns. Add the necessary attributes.

Applied to the qmp branch, thanks.

Quoted 18 lines
---
 monitor.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
monitor.c +2 -1
index da9c9a2..6413d44 100644
@@ -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);