summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-26 17:35:27 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-26 17:35:27 +0200
commit22c105640cdef25d98390f973d2ed53dd9039f6e (patch)
tree6defa0d4d0bfbee6cf72674c5a29f96dcd4a29c0 /src/memline.c
parent833093bfb0e4a7f89b5adc66babcfa8ac09cfda9 (diff)
downloadvim-git-22c105640cdef25d98390f973d2ed53dd9039f6e.tar.gz
patch 8.1.0023: gcc 8.1 warns for use of strncpy()v8.1.0023
Problem: gcc 8.1 warns for use of strncpy(). (John Marriott) Solution: Use mch_memmove() instead of STRNCPY().
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c
index 7d6cefaa0..be395fce6 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -344,7 +344,7 @@ ml_open(buf_T *buf)
b0p->b0_magic_int = (int)B0_MAGIC_INT;
b0p->b0_magic_short = (short)B0_MAGIC_SHORT;
b0p->b0_magic_char = B0_MAGIC_CHAR;
- STRNCPY(b0p->b0_version, "VIM ", 4);
+ mch_memmove(b0p->b0_version, "VIM ", 4);
STRNCPY(b0p->b0_version + 4, Version, 6);
long_to_char((long)mfp->mf_page_size, b0p->b0_page_size);