[PATCH] syntax-check: Fix regex for sc_require_attribute_cleanup_initialization:

Peter Krempa posted 1 patch 2 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/10d0352a68cded53e770799634e673017af3fcae.1636103875.git.pkrempa@redhat.com
build-aux/syntax-check.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] syntax-check: Fix regex for sc_require_attribute_cleanup_initialization:
Posted by Peter Krempa 2 years, 5 months ago
When I was cleaning up the regex after we removed most of our custom
autofree helpers I've forgot to delete one closing brace, thus the regex
was not matching anything.

Fixes: 65f702020e8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 build-aux/syntax-check.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 2a6e2f86a1..4d396699c9 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -910,7 +910,7 @@ sc_prohibit_backslash_alignment:
 # Rule to ensure that variables declared using a cleanup macro are
 # always initialized.
 sc_require_attribute_cleanup_initialization:
-	@prohibit='((g_auto(ptr|free|slist)?)|VIR_AUTOCLOSE)) *[^=]+;' \
+	@prohibit='((g_auto(ptr|free|slist)?)|VIR_AUTOCLOSE) *[^=]+;' \
 	in_vc_files='\.[chx]$$' \
 	halt='variable declared with a cleanup macro must be initialized' \
 	  $(_sc_search_regexp)
-- 
2.31.1

Re: [PATCH] syntax-check: Fix regex for sc_require_attribute_cleanup_initialization:
Posted by Ján Tomko 2 years, 5 months ago
On a Friday in 2021, Peter Krempa wrote:
>When I was cleaning up the regex after we removed most of our custom
>autofree helpers I've forgot to delete one closing brace, thus the regex
>was not matching anything.
>
>Fixes: 65f702020e8

Oh no, how did that get past review? O:-)

>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> build-aux/syntax-check.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>

Jano