[libvirt] [PATCH v3 05/35] cfg.mk: no trailing semicolon at line invoking VIR_DEFINE_* cleanup macro

Sukrit Bhatnagar skrtbhtngr at gmail.com
Sat Jun 30 09:00:09 UTC 2018


Add rule to ensure that there is no semicolon at the end of
the line where a VIR_DEFINE_* cleanup macro is invoked.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr at gmail.com>
---
 cfg.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 7949fc8..d292005 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1085,6 +1085,15 @@ sc_require_attribute_cleanup_one_per_line:
     halt='there must be only one variable declaration per line when using cleanup macro' \
       $(_sc_search_regexp)
 
+# Rule to ensure that there is no trailing semicolon at the line on
+# which a cleanup funciton is defined using a VIR_DEFINE_* macro.
+sc_require_attribute_cleanup_no_semicolon:
+	@prohibit='VIR_DEFINE_AUTOPTR_FUNC\(.+\)\s*;' \
+    in_vc_files='\.[chx]$$' \
+    halt='cleanup macro defining a function must not end with a semicolon' \
+      $(_sc_search_regexp)
+
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
-- 
1.8.3.1




More information about the libvir-list mailing list