diff options
author | luukvbaal <luukvbaal@gmail.com> | 2023-12-11 17:16:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 08:16:35 -0800 |
commit | 6d698c86d0bd27705d425f973e7da59da5dc83b7 (patch) | |
tree | 5a44c9f2b5e3a329196aa7597a3d8fbb846cfe7f /runtime/lua | |
parent | c95b9a32f89b100b0ad50e7ec4e295d2f997cdc9 (diff) | |
download | rneovim-6d698c86d0bd27705d425f973e7da59da5dc83b7.tar.gz rneovim-6d698c86d0bd27705d425f973e7da59da5dc83b7.tar.bz2 rneovim-6d698c86d0bd27705d425f973e7da59da5dc83b7.zip |
fix(coverity): unhandled retval for marktree_itr_get_overlap() #26518
buf_signcols_validate_range() is only called in a buffer with signs, in
which the marktree is thus non-empty. Also remove a redundant comment,
condition and variable.
*** CID 470331: Error handling issues (CHECKED_RETURN)
/src/nvim/decoration.c: 824 in buf_signcols_validate_range()
818
819 // Allocate an array of integers holding the overlapping signs in the range.
820 assert(row2 >= row1);
821 int *overlap = xcalloc(sizeof(int), (size_t)(row2 + 1 - row1));
822
823 // First find the number of overlapping signs at "row1".
>>> CID 470331: Error handling issues (CHECKED_RETURN)
>>> Calling "marktree_itr_get_overlap" without checking return value (as is done elsewhere 4 out of 5 times).
824 marktree_itr_get_overlap(buf->b_marktree, currow, 0, itr);
825 while (marktree_itr_step_overlap(buf->b_marktree, itr, &pair)) {
826 if (!mt_invalid(pair.start) && pair.start.flags & MT_FLAG_DECOR_SIGNTEXT) {
827 overlap[0]++;
828 }
829 }
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions