From 7813d314463c5bccc566aceedd4af2f2a2c37679 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 5 Jun 2024 15:50:28 +0200 Subject: [PATCH] qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/qemumonitortestutils.c | 2 +- tests/qemumonitortestutils.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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);