From 47908a0f66c5369a94e93d951a5d0c28d007ff80 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 17 Nov 2013 19:00:42 +0100 Subject: qobject: Fix compiler warning (missing gnu_printf format attribute) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra): CC qobject/qerror.o qobject/qerror.c: In function ‘qerror_from_info’: qobject/qerror.c:53:5: error: function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] qerr->err_msg = g_strdup_vprintf(fmt, *va); ^ Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- qobject/qerror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qerror.c b/qobject/qerror.c index 3aee1cf6a6..fc8331aa67 100644 --- a/qobject/qerror.c +++ b/qobject/qerror.c @@ -42,8 +42,8 @@ static QError *qerror_new(void) * * Return strong reference. */ -static QError *qerror_from_info(ErrorClass err_class, const char *fmt, - va_list *va) +static QError * GCC_FMT_ATTR(2, 0) +qerror_from_info(ErrorClass err_class, const char *fmt, va_list *va) { QError *qerr; -- cgit v1.2.3