vim-patch:partial:9.0.0364: clang static analyzer gives warnings (#23059)

Problem:    Clang static analyzer gives warnings.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#11043)

c99e182e1f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq 2023-04-13 13:27:50 +08:00 committed by GitHub
parent 5ccec143d8
commit 99c1010aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3322,11 +3322,10 @@ int get_tags(list_T *list, char *pat, char *buf_fname)
}
for (i = 0; i < num_matches; i++) {
int parse_result = parse_match(matches[i], &tp);
// Avoid an unused variable warning in release builds.
(void)parse_result;
assert(parse_result == OK);
if (parse_match(matches[i], &tp) == FAIL) {
xfree(matches[i]);
continue;
}
bool is_static = test_for_static(&tp);