[PATCH] build-aux: remove syntax checks for ATTRIBUTE_* and ARRAY_CARDINALITY

Daniel P. Berrangé posted 1 patch 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220524123216.172560-1-berrange@redhat.com
build-aux/syntax-check.mk | 12 ------------
1 file changed, 12 deletions(-)
[PATCH] build-aux: remove syntax checks for ATTRIBUTE_* and ARRAY_CARDINALITY
Posted by Daniel P. Berrangé 1 year, 11 months ago
These checks made sense when we were in process of converting code.
Since the definition of the macros has been entirely removed now,
the compiler will already thrown an error. There aren't likely to
be any in-flight patches that would hit this anyone either.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 build-aux/syntax-check.mk | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 09e7a014a3..e4c142dfd0 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -338,18 +338,6 @@ 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|NOINLINE|FMT_PRINTF|FALLTHROUGH)' \
-	in_vc_files='\.[ch]$$' \
-	halt='use GLib macros: G_GNUC_<ATTRIBUTE_SUFFIX> for most' \
-	  $(_sc_search_regexp)
-
-sc_prohibit_non_glib_macros:
-	@prohibit='ARRAY_CARDINALITY' \
-	in_vc_files='\.[ch]$$' \
-	halt='use GLib macros: G_N_ELEMENTS' \
-	  $(_sc_search_regexp)
-
 sc_prohibit_int_index:
 	@prohibit='\<(int|unsigned)\s*\*?index\>(\s|,|;)' \
 	halt='use different name than 'index' for declaration' \
-- 
2.36.1

Re: [PATCH] build-aux: remove syntax checks for ATTRIBUTE_* and ARRAY_CARDINALITY
Posted by Michal Prívozník 1 year, 11 months ago
On 5/24/22 14:32, Daniel P. Berrangé wrote:
> These checks made sense when we were in process of converting code.
> Since the definition of the macros has been entirely removed now,
> the compiler will already thrown an error. There aren't likely to
> be any in-flight patches that would hit this anyone either.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  build-aux/syntax-check.mk | 12 ------------
>  1 file changed, 12 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal