mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: tag.c: get_tags(): Uninitialized arg: RI.
Problem : Uninitialized argument value @ 2798. Diagnostic : Real issue. Rationale : Tags doesn't have to have a kind. When they have one, both `tp.tagkind` and `tp.tagkind_end` are nonnull. But when they don't, `tp.tagkind` will we null (but defined), while `tp.tagkind_end` will be undefined. Therefore, reported invocation is indeed using a garbage value for a tag with no kind. Problem doesn't have consequences because `add_tag_field()` doesn't use `end` param if `start` param is null. Resolution : Don't use `tp.tagkind_end` if `tp.tagkind` is null.
This commit is contained in:
parent
3f420ce0d8
commit
b4ae878407
@ -2799,7 +2799,7 @@ int get_tags(list_T *list, char_u *pat)
|
||||
|| add_tag_field(dict, "cmd", tp.command,
|
||||
tp.command_end) == FAIL
|
||||
|| add_tag_field(dict, "kind", tp.tagkind,
|
||||
tp.tagkind_end) == FAIL
|
||||
tp.tagkind ? tp.tagkind_end : NULL) == FAIL
|
||||
|| dict_add_nr_str(dict, "static", is_static, NULL) == FAIL)
|
||||
ret = FAIL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user