aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2014-01-25 18:18:23 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-02-01 13:46:06 +0400
commitd5d1507b347b7cd6c3b82459b96f1889b29939ef (patch)
treefda0206cde763ee5c377d254e95fbdb11b2ae5da /monitor.c
parentc6830cdb2c1053bca1e61eb242b1900489c160af (diff)
downloadqemu-d5d1507b347b7cd6c3b82459b96f1889b29939ef.zip
qemu-d5d1507b347b7cd6c3b82459b96f1889b29939ef.tar.gz
qemu-d5d1507b347b7cd6c3b82459b96f1889b29939ef.tar.bz2
readline: Add missing GCC_FMT_ATTR
This fixes a compiler warning with -Werror=missing-format-attribute and allows improved compiler checks for variable argument lists. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 80456fb..5ba541d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4888,7 +4888,8 @@ static void sortcmdlist(void)
/* These functions just adapt the readline interface in a typesafe way. We
* could cast function pointers but that discards compiler checks.
*/
-static void monitor_readline_printf(void *opaque, const char *fmt, ...)
+static void GCC_FMT_ATTR(2, 3) monitor_readline_printf(void *opaque,
+ const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);