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>
This commit is contained in:
Stefan Weil 2013-11-17 19:00:42 +01:00 committed by Michael Tokarev
parent 867d898ccf
commit 47908a0f66

View File

@ -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;