Patch 9.0.1216
Problem: Coverity warns for ignoring return value.
Solution: Break out of loop if function fails.
Files: src/mbyte.c
*** ../vim-9.0.1215/src/mbyte.c 2023-01-17 18:31:20.427373305 +0000
--- src/mbyte.c 2023-01-18 12:43:47.599916287 +0000
***************
*** 5756,5766 ****
list_T *entry = list_alloc();
if (entry == NULL)
break;
! list_append_number(entry, (varnumber_T)cw_table[i].first);
! list_append_number(entry, (varnumber_T)cw_table[i].last);
! list_append_number(entry, (varnumber_T)cw_table[i].width);
!
! list_append_list(rettv->vval.v_list, entry);
}
}
--- 5756,5769 ----
list_T *entry = list_alloc();
if (entry == NULL)
break;
! if (list_append_number(entry, (varnumber_T)cw_table[i].first) == FAIL
! || list_append_number(entry, (varnumber_T)cw_table[i].last) == FAIL
! || list_append_number(entry, (varnumber_T)cw_table[i].width) == FAIL
! || list_append_list(rettv->vval.v_list, entry) == FAIL)
! {
! list_free(entry);
! break;
! }
}
}
*** ../vim-9.0.1215/src/version.c 2023-01-17 21:38:22.138223711 +0000
--- src/version.c 2023-01-18 12:44:39.271887991 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1216,
/**/
--
How To Keep A Healthy Level Of Insanity:
12. Sing along at the opera.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///