mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
syntax-check: require intialization for new VIR_AUTO macros
The syntax-check should also check the new ones. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9ca7ca3d9f
commit
2ee00d5905
2
cfg.mk
2
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) *[^=]+;' \
|
||||
in_vc_files='\.[chx]$$' \
|
||||
halt='variable declared with a cleanup macro must be initialized' \
|
||||
$(_sc_search_regexp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user