Mercurial > vim
changeset 30094:ab563fdf3735 v9.0.0383
patch 9.0.0383: Coverity complains about unused value
Commit: https://github.com/vim/vim/commit/963ab26842be22c0d210c3e950fecac28578f8be
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 5 10:55:27 2022 +0100
patch 9.0.0383: Coverity complains about unused value
Problem: Coverity complains about unused value.
Solution: Use the value.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Sep 2022 12:00:08 +0200 |
parents | a0d255a91b48 |
children | b5d880b3529e |
files | src/spellfile.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/spellfile.c +++ b/src/spellfile.c @@ -404,7 +404,7 @@ spell_load_file( * <HEADER>: <fileID> */ for (i = 0; i < VIMSPELLMAGICL; ++i) - buf[i] = c = getc(fd); // <fileID> + buf[i] = (c = getc(fd)) == EOF ? 0 : c; // <fileID> if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) { emsg(_(e_this_does_not_look_like_spell_file)); @@ -700,7 +700,7 @@ suggest_load_files(void) * <SUGHEADER>: <fileID> <versionnr> <timestamp> */ for (i = 0; i < VIMSUGMAGICL; ++i) - buf[i] = c = getc(fd); // <fileID> + buf[i] = (c = getc(fd)) == EOF ? 0 : c; // <fileID> if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { semsg(_(e_this_does_not_look_like_sug_file_str),