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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux