From: Michal Privoznik Date: Wed, 5 Jun 2024 13:50:28 +0000 (+0200) Subject: qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7813d314463c5bccc566aceedd4af2f2a2c37679;p=libvirt.git qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse() The qemuMonitorTestAddErrorResponse() function is a printf-like function. But the annotation was mistakenly done in .c file instead of corresponding .h file rendering the annotation ineffective. Move the annotation to the header file. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 4e6a9371cb..88a369188e 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -172,7 +172,7 @@ qemuMonitorTestAddInvalidCommandResponse(qemuMonitorTest *test, } -int G_GNUC_PRINTF(2, 3) +int qemuMonitorTestAddErrorResponse(qemuMonitorTest *test, const char *errmsg, ...) { va_list msgargs; diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index edd38d8df6..6d26526f60 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -52,7 +52,8 @@ qemuMonitorTestItemGetPrivateData(qemuMonitorTestItem *item); int qemuMonitorTestAddErrorResponse(qemuMonitorTest *test, const char *errmsg, - ...); + ...) + G_GNUC_PRINTF(2, 3); void qemuMonitorTestAllowUnusedCommands(qemuMonitorTest *test);