[libvirt PATCH RFC 17/19] src: internal: add VIR_WARNINGS_NO_DECLARATION_AFTER_STATEMENT
Ján Tomko
jtomko at redhat.com
Mon Aug 3 16:56:54 UTC 2020
Add a macro to suppress the warning.
Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
src/internal.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/internal.h b/src/internal.h
index 3aa3c6ca67..d95db330b3 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -194,6 +194,10 @@
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wunused-variable\"")
+#define VIR_WARNINGS_NO_DECLARATION_AFTER_STATEMENT \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
+
#define VIR_WARNINGS_RESET \
_Pragma ("GCC diagnostic pop")
--
2.26.2
More information about the libvir-list
mailing list