tests: add G_GNUC_PRINTF for various functions

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219130205.687815-6-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-12-19 08:02:04 -05:00 committed by Paolo Bonzini
parent beede7e848
commit 0472b2e541
14 changed files with 36 additions and 18 deletions

View file

@ -3,8 +3,10 @@
#include "libqos.h"
QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap);
QOSState *qtest_pc_boot(const char *cmdline_fmt, ...);
QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap)
G_GNUC_PRINTF(1, 0);
QOSState *qtest_pc_boot(const char *cmdline_fmt, ...)
G_GNUC_PRINTF(1, 2);
void qtest_pc_shutdown(QOSState *qs);
#endif

View file

@ -3,8 +3,10 @@
#include "libqos.h"
QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap);
QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...);
QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap)
G_GNUC_PRINTF(1, 0);
QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...)
G_GNUC_PRINTF(1, 2);
void qtest_spapr_shutdown(QOSState *qs);
/* List of capabilities needed to silence warnings with TCG */

View file

@ -21,8 +21,10 @@ struct QOSState {
QOSOps *ops;
};
QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap);
QOSState *qtest_boot(QOSOps *ops, const char *cmdline_fmt, ...);
QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap)
G_GNUC_PRINTF(2, 0);
QOSState *qtest_boot(QOSOps *ops, const char *cmdline_fmt, ...)
G_GNUC_PRINTF(2, 3);
void qtest_common_shutdown(QOSState *qs);
void qtest_shutdown(QOSState *qs);
bool have_qemu_img(void);

View file

@ -211,6 +211,7 @@ static void *virtio_9p_pci_create(void *pci_bus, QGuestAllocator *t_alloc,
* variable arguments of this function to this
* replacement string
*/
G_GNUC_PRINTF(3, 4)
static void regex_replace(GString *haystack, const char *pattern,
const char *replace_fmt, ...)
{