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 ****
       * <HEADER>: <fileID>
       */
      for (i = 0; i < VIMSPELLMAGICL; ++i)
!       buf[i] = getc(fd);                              // <fileID>
      if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
      {
        emsg(_(e_this_does_not_look_like_spell_file));
--- 404,410 ----
       * <HEADER>: <fileID>
       */
      for (i = 0; i < VIMSPELLMAGICL; ++i)
!       buf[i] = (unsigned)getc(fd);                    // <fileID>
      if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
      {
        emsg(_(e_this_does_not_look_like_spell_file));
***************
*** 700,706 ****
             * <SUGHEADER>: <fileID> <versionnr> <timestamp>
             */
            for (i = 0; i < VIMSUGMAGICL; ++i)
!               buf[i] = getc(fd);                      // <fileID>
            if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0)
            {
                semsg(_(e_this_does_not_look_like_sug_file_str),
--- 700,706 ----
             * <SUGHEADER>: <fileID> <versionnr> <timestamp>
             */
            for (i = 0; i < VIMSUGMAGICL; ++i)
!               buf[i] = (unsigned)getc(fd);            // <fileID>
            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);                   // <regionname>
      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);         // <regionname>
      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);                        // <condstr>
            *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);              // <condstr>
            *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);                    // <salfrom>
        *p++ = NUL;
  
        // <saltolen> <salto>
--- 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);                  // <salfrom>
        *p++ = NUL;
  
        // <saltolen> <salto>
*** ../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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220903115349.6DF4C1C0CE4%40moolenaar.net.

Raspunde prin e-mail lui