]> granicus.if.org Git - vim/commitdiff
patch 9.0.0383: Coverity complains about unused value v9.0.0383
authorBram Moolenaar <Bram@vim.org>
Mon, 5 Sep 2022 09:55:27 +0000 (10:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Sep 2022 09:55:27 +0000 (10:55 +0100)
Problem:    Coverity complains about unused value.
Solution:   Use the value.

src/spellfile.c
src/version.c

index d650f870eb304bfb9729a3ed0138a6ea52744355..b248b07ee49c1e9e0054f55a94b4dfc34ff8da44 100644 (file)
@@ -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),
index 5961413079db2d1d0cbf96e811803e32256eba72..767fdc5806bc99241506b7f4a6eafa688b2125ae 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    383,
 /**/
     382,
 /**/