mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 04:28:33 +00:00
gcc/analyzer: fix false positives for NULL (#13248)
Close https://github.com/neovim/neovim/issues/13158
This commit is contained in:
@@ -159,8 +159,11 @@ static int conv_error(const char *const msg, const MPConvStack *const mpstack,
|
||||
vim_snprintf((char *)IObuff, IOSIZE, idx_msg, idx);
|
||||
ga_concat(&msg_ga, IObuff);
|
||||
} else {
|
||||
typval_T key_tv = *TV_LIST_ITEM_TV(
|
||||
tv_list_first(TV_LIST_ITEM_TV(li)->vval.v_list));
|
||||
assert(li != NULL);
|
||||
listitem_T *const first_item =
|
||||
tv_list_first(TV_LIST_ITEM_TV(li)->vval.v_list);
|
||||
assert(first_item != NULL);
|
||||
typval_T key_tv = *TV_LIST_ITEM_TV(first_item);
|
||||
char *const key = encode_tv2echo(&key_tv, NULL);
|
||||
vim_snprintf((char *) IObuff, IOSIZE, key_pair_msg, key, idx);
|
||||
xfree(key);
|
||||
|
Reference in New Issue
Block a user