diff options
author | Stefan Weil <sw@weilnetz.de> | 2011-12-23 20:34:38 +0100 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-01-18 10:23:39 -0200 |
commit | aba2107a2649f3eeab4422efa17dbd06929abccd (patch) | |
tree | df9e2235364e94ad64d896b26c6b9b1b62f55ed7 /test-qmp-input-visitor.c | |
parent | 80047da59b17053b69e8bdc143c8fb4b3a44cb7d (diff) |
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>
Diffstat (limited to 'test-qmp-input-visitor.c')
-rw-r--r-- | test-qmp-input-visitor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test-qmp-input-visitor.c b/test-qmp-input-visitor.c index 1f3ab031f7..926db5cb91 100644 --- a/test-qmp-input-visitor.c +++ b/test-qmp-input-visitor.c @@ -38,8 +38,9 @@ static void visitor_input_teardown(TestInputVisitorData *data, /* 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 int main()) */ -static Visitor *visitor_input_test_init(TestInputVisitorData *data, - const char *json_string, ...) +static GCC_FMT_ATTR(2, 3) +Visitor *visitor_input_test_init(TestInputVisitorData *data, + const char *json_string, ...) { Visitor *v; va_list ap; @@ -66,7 +67,7 @@ static void test_visitor_in_int(TestInputVisitorData *data, Error *errp = NULL; 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); g_assert(!error_is_set(&errp)); |