]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 5 Jun 2024 13:50:28 +0000 (15:50 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 6 Jun 2024 07:32:43 +0000 (09:32 +0200)
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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemumonitortestutils.c
tests/qemumonitortestutils.h

index 4e6a9371cb856ea04d2e27cf7fd3061df1d904ec..88a369188e37b90f4de813386d658778ee7cbe13 100644 (file)
@@ -172,7 +172,7 @@ qemuMonitorTestAddInvalidCommandResponse(qemuMonitorTest *test,
 }
 
 
-int G_GNUC_PRINTF(2, 3)
+int
 qemuMonitorTestAddErrorResponse(qemuMonitorTest *test, const char *errmsg, ...)
 {
     va_list msgargs;
index edd38d8df6ac303f9226a86616ad8a49a522d837..6d26526f607f84f4c96e91ec04c44c19ae1ed6b7 100644 (file)
@@ -52,7 +52,8 @@ qemuMonitorTestItemGetPrivateData(qemuMonitorTestItem *item);
 int
 qemuMonitorTestAddErrorResponse(qemuMonitorTest *test,
                                 const char *errmsg,
-                                ...);
+                                ...)
+    G_GNUC_PRINTF(2, 3);
 
 void
 qemuMonitorTestAllowUnusedCommands(qemuMonitorTest *test);