* [Qemu-devel] [PATCH] qmp: Add missing gcc format attribute and fix format string
@ 2011-12-23 19:34 Stefan Weil
2011-12-30 11:56 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2011-12-23 19:34 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
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 1f3ab03..bc410c6 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));
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qmp: Add missing gcc format attribute and fix format string
2011-12-23 19:34 [Qemu-devel] [PATCH] qmp: Add missing gcc format attribute and fix format string Stefan Weil
@ 2011-12-30 11:56 ` Stefan Hajnoczi
2012-01-03 19:36 ` Luiz Capitulino
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-12-30 11:56 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel
On Fri, Dec 23, 2011 at 08:34:38PM +0100, Stefan Weil wrote:
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> test-qmp-input-visitor.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
Although we're not strictly implementing printf format strings it's
close enough that this seems worth having. If we ever introduce format
specifiers that have a different meaning under printf then we need to
rethink this.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qmp: Add missing gcc format attribute and fix format string
2011-12-30 11:56 ` Stefan Hajnoczi
@ 2012-01-03 19:36 ` Luiz Capitulino
0 siblings, 0 replies; 3+ messages in thread
From: Luiz Capitulino @ 2012-01-03 19:36 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Stefan Weil, qemu-devel
On Fri, 30 Dec 2011 11:56:14 +0000
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Fri, Dec 23, 2011 at 08:34:38PM +0100, Stefan Weil wrote:
> > Signed-off-by: Stefan Weil <sw@weilnetz.de>
> > ---
> > test-qmp-input-visitor.c | 7 ++++---
> > 1 files changed, 4 insertions(+), 3 deletions(-)
>
> Although we're not strictly implementing printf format strings it's
> close enough that this seems worth having. If we ever introduce format
> specifiers that have a different meaning under printf then we need to
> rethink this.
>
> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Applied to the qmp branch, thanks Stefans.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-03 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23 19:34 [Qemu-devel] [PATCH] qmp: Add missing gcc format attribute and fix format string Stefan Weil
2011-12-30 11:56 ` Stefan Hajnoczi
2012-01-03 19:36 ` Luiz Capitulino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).