# HG changeset patch # User Christian Brabandt # Date 1527349506 -7200 # Node ID 8631b54ae2a244eaec1b0dca3567b6a44869b916 # Parent 0a4514f40d195f66b266602bd3364e0b27c637bf patch 8.1.0023: gcc 8.1 warns for use of strncpy() commit https://github.com/vim/vim/commit/22c105640cdef25d98390f973d2ed53dd9039f6e Author: Bram Moolenaar Date: Sat May 26 17:35:27 2018 +0200 patch 8.1.0023: gcc 8.1 warns for use of strncpy() Problem: gcc 8.1 warns for use of strncpy(). (John Marriott) Solution: Use mch_memmove() instead of STRNCPY(). diff --git a/src/memline.c b/src/memline.c --- 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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 23, +/**/ 22, /**/ 21,