qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 16/23] migration-test: Make wait_command() co


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 16/23] migration-test: Make wait_command() cope with '%'
Date: Fri, 27 Jul 2018 11:02:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/27/2018 10:13 AM, Markus Armbruster wrote:
wait_command() passes its argument @command to qtest_qmp_send().
Falls apart if @command contain '%'.  Two ways to disarm this trap:
suppress interpretation of '%' by passing @command as argument to
format string "%s", or fix it by having wait_command() take the
variable arguments to go with @command.  Do the latter.

This is another step towards compile-time format string checking
without triggering -Wformat-nonliteral.


Aha - fixes up the complaints I had on 15/23.

Cc: Juan Quintela <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
---
  tests/migration-test.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]