summaryrefslogtreecommitdiff
path: root/qobject
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-11-17 19:00:42 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2013-12-02 21:02:57 +0400
commit47908a0f66c5369a94e93d951a5d0c28d007ff80 (patch)
treeaede3636510dcb3af5021a23e125fc4d65bf5281 /qobject
parent867d898ccf50ef095b95c403d7dc809c188b14e2 (diff)
qobject: Fix compiler warning (missing gnu_printf format attribute)
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 <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'qobject')
-rw-r--r--qobject/qerror.c4
1 files 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;