summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-05 13:02:28 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-05 13:02:28 +0200
commitb3de6c4a769986e6eb4e228519a6483d2999ad8f (patch)
tree75441353e79c4fd4becdb0d7362f85e4301f96f0
parent9dfa3139198b38b28673e251a3756430065914e9 (diff)
downloadvim-git-b3de6c4a769986e6eb4e228519a6483d2999ad8f.tar.gz
patch 8.1.1271: compiler warnings for use of STRNCPY()v8.1.1271
Problem: Compiler warnings for use of STRNCPY(). (John Marriott) Solution: Use mch_memmove() instead of STRNCPY().
-rw-r--r--src/search.c6
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/search.c b/src/search.c
index 3df3ca61d..1fa52b443 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1415,10 +1415,10 @@ do_search(
{
// Use a space to draw the composing char on.
msgbuf[1] = ' ';
- STRNCPY(msgbuf + 2, p, STRLEN(p));
+ mch_memmove(msgbuf + 2, p, STRLEN(p));
}
else
- STRNCPY(msgbuf + 1, p, STRLEN(p));
+ mch_memmove(msgbuf + 1, p, STRLEN(p));
if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
{
p = msgbuf + STRLEN(p) + 1;
@@ -5006,7 +5006,7 @@ search_stat(
else
vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
}
- STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
+ mch_memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
if (dirc == '?' && cur == 100)
cur = -1;
diff --git a/src/version.c b/src/version.c
index 8dee65efa..0fa3c4119 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1271,
+/**/
1270,
/**/
1269,