To: vim_dev@googlegroups.com Subject: Patch 9.0.0367 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0367 Problem: Coverity complains about dropping sign of character. Solution: Add explicit type cast. Files: src/spellfile.c *** ../vim-9.0.0366/src/spellfile.c 2022-08-21 20:33:44.157711380 +0100 --- src/spellfile.c 2022-09-03 12:51:47.483260917 +0100 *************** *** 404,410 **** *
: */ for (i = 0; i < VIMSPELLMAGICL; ++i) ! buf[i] = getc(fd); // if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) { emsg(_(e_this_does_not_look_like_spell_file)); --- 404,410 ---- *
: */ for (i = 0; i < VIMSPELLMAGICL; ++i) ! buf[i] = (unsigned)getc(fd); // if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) { emsg(_(e_this_does_not_look_like_spell_file)); *************** *** 700,706 **** * : */ for (i = 0; i < VIMSUGMAGICL; ++i) ! buf[i] = getc(fd); // if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { semsg(_(e_this_does_not_look_like_sug_file_str), --- 700,706 ---- * : */ for (i = 0; i < VIMSUGMAGICL; ++i) ! buf[i] = (unsigned)getc(fd); // if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0) { semsg(_(e_this_does_not_look_like_sug_file_str), *************** *** 845,851 **** if (len > MAXREGIONS * 2) return SP_FORMERROR; for (i = 0; i < len; ++i) ! lp->sl_regions[i] = getc(fd); // lp->sl_regions[len] = NUL; return 0; } --- 845,851 ---- if (len > MAXREGIONS * 2) return SP_FORMERROR; for (i = 0; i < len; ++i) ! lp->sl_regions[i] = (unsigned)getc(fd); // lp->sl_regions[len] = NUL; return 0; } *************** *** 925,931 **** buf[0] = '^'; // always match at one position only p = buf + 1; while (n-- > 0) ! *p++ = getc(fd); // *p = NUL; lp->sl_prefprog[i] = vim_regcomp(buf, RE_MAGIC + RE_STRING); } --- 925,931 ---- buf[0] = '^'; // always match at one position only p = buf + 1; while (n-- > 0) ! *p++ = (unsigned)getc(fd); // *p = NUL; lp->sl_prefprog[i] = vim_regcomp(buf, RE_MAGIC + RE_STRING); } *************** *** 1063,1069 **** // store the char we got while checking for end of sm_lead *p++ = c; for (++i; i < ccnt; ++i) ! *p++ = getc(fd); // *p++ = NUL; // --- 1063,1069 ---- // store the char we got while checking for end of sm_lead *p++ = c; for (++i; i < ccnt; ++i) ! *p++ = (unsigned)getc(fd); // *p++ = NUL; // *** ../vim-9.0.0366/src/version.c 2022-09-03 12:09:02.530363340 +0100 --- src/version.c 2022-09-03 12:52:49.571098354 +0100 *************** *** 709,710 **** --- 709,712 ---- { /* Add new patch number below this line */ + /**/ + 367, /**/ -- Sometimes you can protect millions of dollars in your budget simply by buying a bag of cookies, dropping it on the budget anylyst's desk, and saying something deeply personal such as "How was your weekend, big guy?" (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@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 ///