aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-18 17:43:44 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-18 19:41:54 +0800
commit30e6cc405f86034fc024eb6e8a32464696c5d6da (patch)
treefae94eb72b87e081c0b138b1c573e0d8422d72d5 /src
parentb2345ddbf33ab4941839ac0976a9e8261b284c40 (diff)
downloadrneovim-30e6cc405f86034fc024eb6e8a32464696c5d6da.tar.gz
rneovim-30e6cc405f86034fc024eb6e8a32464696c5d6da.tar.bz2
rneovim-30e6cc405f86034fc024eb6e8a32464696c5d6da.zip
vim-patch:8.2.4544: Coverity warnings for not using returned value
Problem: Coverity warnings for not using returned value. Solution: Assign to vim_ignored. https://github.com/vim/vim/commit/dbf8094b17781ab1db191cf690e59c79f508a50f Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index 86ee9badeb..c5df68d451 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -1581,13 +1581,13 @@ static tags_read_status_T findtags_get_next_line(findtags_state_T *st, tagsearch
if (st->state == TS_BINARY || st->state == TS_SKIP_BACK) {
// Adjust the search file offset to the correct position
sinfo_p->curr_offset_used = sinfo_p->curr_offset;
- vim_fseek(st->fp, sinfo_p->curr_offset, SEEK_SET);
+ vim_ignored = vim_fseek(st->fp, sinfo_p->curr_offset, SEEK_SET);
eof = vim_fgets((char_u *)st->lbuf, st->lbuf_size, st->fp);
if (!eof && sinfo_p->curr_offset != 0) {
sinfo_p->curr_offset = vim_ftell(st->fp);
if (sinfo_p->curr_offset == sinfo_p->high_offset) {
// oops, gone a bit too far; try from low offset
- vim_fseek(st->fp, sinfo_p->low_offset, SEEK_SET);
+ vim_ignored = vim_fseek(st->fp, sinfo_p->low_offset, SEEK_SET);
sinfo_p->curr_offset = sinfo_p->low_offset;
}
eof = vim_fgets((char_u *)st->lbuf, st->lbuf_size, st->fp);
@@ -1706,7 +1706,7 @@ static bool findtags_start_state_handler(findtags_state_T *st, bool *sortic,
// Don't use lseek(), it doesn't work
// properly on MacOS Catalina.
const off_T filesize = vim_ftell(st->fp);
- vim_fseek(st->fp, 0, SEEK_SET);
+ vim_ignored = vim_fseek(st->fp, 0, SEEK_SET);
// Calculate the first read offset in the file. Start
// the search in the middle of the file.
@@ -2163,7 +2163,7 @@ line_read_in:
if (st->state == TS_STEP_FORWARD) {
// Seek to the same position to read the same line again
- vim_fseek(st->fp, search_info.curr_offset, SEEK_SET);
+ vim_ignored = vim_fseek(st->fp, search_info.curr_offset, SEEK_SET);
}
// this will try the same thing again, make sure the offset is
// different
@@ -2233,8 +2233,8 @@ static void findtags_in_file(findtags_state_T *st, int flags, char *buf_ffname)
if (st->fp != NULL) {
fclose(st->fp);
+ st->fp = NULL;
}
- st->fp = NULL;
if (st->vimconv.vc_type != CONV_NONE) {
convert_setup(&st->vimconv, NULL, NULL);
}