提交 00d465bb 编写于 作者: A Andrea Bolognani

syntax-check: Prohibit canonicalize_file_name()

We want to make sure our wrapper is used instead in order
to keep the test suite working.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 3bfe72e3
...@@ -462,6 +462,13 @@ sc_prohibit_ctype_h: ...@@ -462,6 +462,13 @@ sc_prohibit_ctype_h:
halt='use c-ctype.h instead of ctype.h' \ halt='use c-ctype.h instead of ctype.h' \
$(_sc_search_regexp) $(_sc_search_regexp)
# We have our own wrapper for mocking purposes
sc_prohibit_canonicalize_file_name:
@prohibit='\<canonicalize_file_name\(' \
exclude='exempt from syntax-check' \
halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \
$(_sc_search_regexp)
# Insist on correct types for [pug]id. # Insist on correct types for [pug]id.
sc_correct_id_types: sc_correct_id_types:
@prohibit='\<(int|long) *[pug]id\>' \ @prohibit='\<(int|long) *[pug]id\>' \
...@@ -1208,6 +1215,9 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \ ...@@ -1208,6 +1215,9 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \
exclude_file_name_regexp--sc_prohibit_select = \ exclude_file_name_regexp--sc_prohibit_select = \
^cfg\.mk$$ ^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \
^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_raw_allocation = \ exclude_file_name_regexp--sc_prohibit_raw_allocation = \
^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$ ^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$
......
...@@ -3309,7 +3309,7 @@ virFileSanitizePath(const char *path) ...@@ -3309,7 +3309,7 @@ virFileSanitizePath(const char *path)
char * char *
virFileCanonicalizePath(const char *path) virFileCanonicalizePath(const char *path)
{ {
return canonicalize_file_name(path); return canonicalize_file_name(path); /* exempt from syntax-check */
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册