[RFC 04/21] maint: Add helper macro VIR_USED

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

 



The macro VIR_USED is used in generated parse/format functions to
avoid args-unused warnings.

Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx>
---
 src/internal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/internal.h b/src/internal.h
index e181218..315f12d 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -502,3 +502,5 @@ enum {
 # define fprintf(fh, ...) g_fprintf(fh, __VA_ARGS__)
 
 #endif /* VIR_NO_GLIB_STDIO */
+
+#define VIR_USED(var) do { break; } while(var)
-- 
2.17.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