[PATCH 2/2] qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse()

Michal Privoznik posted 2 patches 4 months, 2 weeks ago
[PATCH 2/2] qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse()
Posted by Michal Privoznik 4 months, 2 weeks ago
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 <mprivozn@redhat.com>
---
 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);
-- 
2.44.1