[libvirt] [PATCH 1/5] cfg: Add VIR_AUTO(UNREF|CLEAN|STRINGLIST) to sc_requirere_attribute_cleanup_initialization

Ján Tomko jtomko at redhat.com
Wed Feb 27 13:28:12 UTC 2019


d/'requirere'/
how about:
syntax-check: require intialization for new VIR_AUTO macros

On Tue, Feb 26, 2019 at 06:08:08PM +0100, Peter Krempa wrote:
>The syntaxcheck should also check the new ones.

s/syntaxcheck/syntax-check/

>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> cfg.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/cfg.mk b/cfg.mk
>index 7762422da7..f99b8ae631 100644
>--- a/cfg.mk
>+++ b/cfg.mk
>@@ -1070,7 +1070,7 @@ sc_prohibit_backslash_alignment:
> # Rule to ensure that variables declared using a cleanup macro are
> # always initialized.
> sc_require_attribute_cleanup_initialization:
>-	@prohibit='VIR_AUTO((FREE|PTR)\(.+\)|CLOSE) *[^=]+;' \
>+	@prohibit='VIR_AUTO((FREE|PTR|UNREF|CLEAN)\(.+\)|CLOSE|STRINGLIST) *[^=]+;' \

Note that VIR_AUTOSTRINGLIST is not merged yet.

> 	in_vc_files='\.[chx]$$' \
> 	halt='variable declared with a cleanup macro must be initialized' \
> 	  $(_sc_search_regexp)

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

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190227/16dd6834/attachment-0001.sig>


More information about the libvir-list mailing list