[PATCH v2 34/34] syntax-check: sc_prohibit_nonreentrant: skip comments

Victor Toso victortoso at redhat.com
Thu Apr 14 20:47:45 UTC 2022


It doesn't need to fail the test if a reentrant function is found in
a comment.

Fixes:
 | ...
 | prohibit_nonreentrant
 | libvirt/ci/helper:33:            default=os.getlogin(),  # exempt from syntax-check
 | libvirt/include/libvirt/libvirt-storage.h:223:    VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = 6, /* 7-pass random (Since: v1.0.0) */
 | libvirt/include/libvirt/libvirt-storage.h:225:    VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = 7, /* 33-pass random (Since: v1.0.0) */
 | libvirt/include/libvirt/libvirt-storage.h:227:    VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random (Since: v1.0.0) */

Signed-off-by: Victor Toso <victortoso at 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 a6e3ada300..eb403f3d3f 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -300,7 +300,7 @@ sc_prohibit_PATH_MAX:
 include $(top_srcdir)/build-aux/Makefile.nonreentrant
 sc_prohibit_nonreentrant:
 	@prohibit="\\<(${NON_REENTRANT_RE}) *\\(" \
-	exclude='exempt from syntax-check' \
+	exclude='exempt from syntax-check|\/\*.*\*\/' \
 	halt="use re-entrant functions (usually ending with _r)" \
 	  $(_sc_search_regexp)
 
-- 
2.35.1



More information about the libvir-list mailing list