]> xenbits.xensource.com Git - libvirt.git/commitdiff
syntax-check: forbid ATTRIBUTE macros with a GLib replacement
authorJán Tomko <jtomko@redhat.com>
Mon, 14 Oct 2019 15:46:42 +0000 (17:46 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 15 Oct 2019 09:25:26 +0000 (11:25 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
build-aux/syntax-check.mk

index c220dadd6c4711fd145682e8f5b154472e0c2851..c30d575e7747d04cbac47e8763b02354247b6bdc 100644 (file)
@@ -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' \