qmp: Add missing gcc format attribute and fix format string

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Stefan Weil 2011-12-23 20:34:38 +01:00 committed by Luiz Capitulino
parent 80047da59b
commit aba2107a26

View file

@ -38,8 +38,9 @@ static void visitor_input_teardown(TestInputVisitorData *data,
/* This is provided instead of a test setup function so that the JSON /* This is provided instead of a test setup function so that the JSON
string used by the tests are kept in the test functions (and not string used by the tests are kept in the test functions (and not
int main()) */ int main()) */
static Visitor *visitor_input_test_init(TestInputVisitorData *data, static GCC_FMT_ATTR(2, 3)
const char *json_string, ...) Visitor *visitor_input_test_init(TestInputVisitorData *data,
const char *json_string, ...)
{ {
Visitor *v; Visitor *v;
va_list ap; va_list ap;
@ -66,7 +67,7 @@ static void test_visitor_in_int(TestInputVisitorData *data,
Error *errp = NULL; Error *errp = NULL;
Visitor *v; Visitor *v;
v = visitor_input_test_init(data, "%d", value); v = visitor_input_test_init(data, "%" PRId64, value);
visit_type_int(v, &res, NULL, &errp); visit_type_int(v, &res, NULL, &errp);
g_assert(!error_is_set(&errp)); g_assert(!error_is_set(&errp));