[PATCH 36/35] syntax-check: forbid ATTRIBUTE macros with a GLib replacement

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

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 build-aux/syntax-check.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index c220dadd6c..c30d575e77 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -628,6 +628,12 @@ sc_avoid_g_gnuc_unused_in_header:
 	halt='use G_GNUC_UNUSED in .c rather than .h files' \
 	  $(_sc_search_regexp)
 
+sc_prohibit_attribute_macros:
+	@prohibit='ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK)' \
+	in_vc_files='\.[ch]$$' \
+	halt='use GLib macros: G_GNUC_{UNUSED,NORETURN,NULL_TERMINATED,WARN_UNUSED_RESULT}' \
+	  $(_sc_search_regexp)
+
 sc_prohibit_int_index:
 	@prohibit='\<(int|unsigned)\s*\*?index\>(\s|,|;)' \
 	halt='use different name than 'index' for declaration' \
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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