]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1641: a few compiler warnings are output v9.1.1641
authorYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 17 Aug 2025 19:02:44 +0000 (21:02 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 17 Aug 2025 19:02:44 +0000 (21:02 +0200)
Problem:  a few compiler warnings are output
Solution: Fix compiler warnings (Yegappan Lakshmanan)

closes: #18025

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/clipboard.c
src/dosinst.c
src/insexpand.c
src/version.c

index 55fa0ad9f04b3662f67648175d5375e5bb48e44c..5d2dec3afe830c98abe1a6a325a81813a05c35ac 100644 (file)
@@ -2405,7 +2405,7 @@ poll_data:
        {
            if (ga_grow(&buf, 8192) == FAIL)
                break;
-           start = buf.ga_data + buf.ga_len;
+           start = (char_u *)buf.ga_data + buf.ga_len;
        }
     }
 
index 3c2dc157208b9f06cf57973a244dca169e53441d..76643e53b99e1ab63eed4044398df4c173fe847e 100644 (file)
@@ -2174,7 +2174,7 @@ init_homedir(void)
        if (homedrive != NULL
                   && strlen(homedrive) + strlen(homepath) < sizeof(buf))
        {
-           sprintf(buf, "%s%s", homedrive, homepath);
+           snprintf(buf, sizeof(buf), "%s%s", homedrive, homepath);
            if (buf[0] != NUL)
                var = buf;
        }
@@ -2202,7 +2202,7 @@ init_homedir(void)
            if (exp != NULL && *exp != NUL
                                && strlen(exp) + strlen(p) < sizeof(buf))
            {
-               sprintf(buf, "%s%s", exp, p + 1);
+               snprintf(buf, sizeof(buf), "%s%s", exp, p + 1);
                var = buf;
            }
        }
index b4364be63f1de1aebfbd1ca27453cb81955b1d0d..85284f2c63c39b6d63f3f449f996978b2b670f3a 100644 (file)
@@ -7078,7 +7078,8 @@ ins_complete(int c, int enable_pum)
     int                insert_match;
     int                no_matches_found;
 #ifdef ELAPSED_FUNC
-    elapsed_T  compl_start_tv; // Timestamp when match collection starts
+    // Timestamp when match collection starts
+    elapsed_T  compl_start_tv = {0};
 #endif
 
     compl_direction = ins_compl_key2dir(c);
index f890e8a68e0f3d66daaa2faade12b114b23b4269..610114d6d70135df0590a9249ce4ad24bc37a1fc 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1641,
 /**/
     1640,
 /**/