diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-03 12:53:20 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-03 12:53:20 +0100 |
commit | 0a6bb59f6b198b351555dc0919816c9f0f1e3ed9 (patch) | |
tree | ff5d06efc604e5eec403a2830fdcbfee2a78c1d1 | |
parent | 6ac69ed9a23fcbccc54574ded1cbab5065e19c41 (diff) | |
download | vim-git-0a6bb59f6b198b351555dc0919816c9f0f1e3ed9.tar.gz |
patch 9.0.0367: Coverity complains about dropping sign of characterv9.0.0367
Problem: Coverity complains about dropping sign of character.
Solution: Add explicit type cast.
-rw-r--r-- | src/spellfile.c | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/spellfile.c b/src/spellfile.c index 7620affee..8b6388fb5 100644 --- 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] = getc(fd); // <fileID> + buf[i] = (unsigned)getc(fd); // <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] = getc(fd); // <fileID> + buf[i] = (unsigned)getc(fd); // <fileID> if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { semsg(_(e_this_does_not_look_like_sug_file_str), @@ -845,7 +845,7 @@ read_region_section(FILE *fd, slang_T *lp, int len) if (len > MAXREGIONS * 2) return SP_FORMERROR; for (i = 0; i < len; ++i) - lp->sl_regions[i] = getc(fd); // <regionname> + lp->sl_regions[i] = (unsigned)getc(fd); // <regionname> lp->sl_regions[len] = NUL; return 0; } @@ -925,7 +925,7 @@ read_prefcond_section(FILE *fd, slang_T *lp) buf[0] = '^'; // always match at one position only p = buf + 1; while (n-- > 0) - *p++ = getc(fd); // <condstr> + *p++ = (unsigned)getc(fd); // <condstr> *p = NUL; lp->sl_prefprog[i] = vim_regcomp(buf, RE_MAGIC + RE_STRING); } @@ -1063,7 +1063,7 @@ read_sal_section(FILE *fd, slang_T *slang) // store the char we got while checking for end of sm_lead *p++ = c; for (++i; i < ccnt; ++i) - *p++ = getc(fd); // <salfrom> + *p++ = (unsigned)getc(fd); // <salfrom> *p++ = NUL; // <saltolen> <salto> diff --git a/src/version.c b/src/version.c index 1c685d139..e8f40e4c7 100644 --- a/src/version.c +++ b/src/version.c @@ -708,6 +708,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 367, +/**/ 366, /**/ 365, |