On 08/09/2017 11:01 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> All callers have been converted to a form of qmp_cmd() or >> qmp_args() that takes the command name with less boilerplate. >> Therefore, we also know that all commands are using >> interpolation, and can remove an assertion. >> >> This also means that we have fixed the testsuite to comply with >> -Wformat checking on the strings being interpolated for qmp() >> (similar to what we previously did for strings used in hmp(), and >> matching the checking present on qobject_from_jsonf()). >> >> Signed-off-by: Eric Blake <ebl...@redhat.com> >> ---
>> - * A round trip through QObject is only needed if % interpolation >> - * is used. We interpolate through QObject rather than sprintf in >> - * order to escape strings properly. >> + * A round trip through QObject (and not sprintf) is needed >> + * because % interpolation is used, and we must escape strings >> + * properly. >> */ >> - if (!strchr(fmt, '%')) { >> - qmp_fd_send(s->qmp_fd, fmt); >> - return; >> - } >> + assert(strchr(fmt, '%')); > > What exactly is wrong with a @fmt that doesn't contain '%'? Nothing, so much as proving to myself that I indeed converted all the qmp() calls. As before, the assertion is not vital to the series, and can be omitted on the respin. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature