diff options
| author | Eric Blake <eblake@redhat.com> | 2018-08-06 08:53:26 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2018-08-16 08:42:06 +0200 |
| commit | bb340eb2387edfc59098bde4caea387c369005b1 (patch) | |
| tree | 3fdc044a05ef149ff29fbc4362bb47f34f240e8a /scripts/qapi/doc.py | |
| parent | 055a1efc7c5a30ca0993720da57ba70179d28c7b (diff) | |
| download | focaccia-qemu-bb340eb2387edfc59098bde4caea387c369005b1.tar.gz focaccia-qemu-bb340eb2387edfc59098bde4caea387c369005b1.zip | |
libqtest: Document calling conventions
We have two flavors of vararg usage in qtest: qtest_hmp() etc. work like sprintf(), and qtest_qmp() etc. work like qobject_from_jsonf(). Spell that out in the comments. Also add GCC_FMT_ATTR() to qtest_hmp() etc. so that the compiler can flag incorrect use. We have some cleanup work to do before we can do the same for qtest_qmp() etc. This would get us the same better-than-nothing checking we already have for qobject_from_jsonf(): common incorrect uses of supported conversion specifications will be flagged (e.g. passing a double for %d), but use of unsupported ones won't. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased, comment wording tweaked, commit message rewritten] Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180806065344.7103-6-armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/doc.py')
0 files changed, 0 insertions, 0 deletions