comparison src/memline.c @ 14011:8631b54ae2a2 v8.1.0023

patch 8.1.0023: gcc 8.1 warns for use of strncpy() commit https://github.com/vim/vim/commit/22c105640cdef25d98390f973d2ed53dd9039f6e Author: Bram Moolenaar <Bram@vim.org> 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().
author Christian Brabandt <cb@256bit.org>
date Sat, 26 May 2018 17:45:06 +0200
parents 4d5a1ada407e
children dddba3937532
comparison
equal deleted inserted replaced
14010:0a4514f40d19 14011:8631b54ae2a2
342 b0p->b0_id[1] = BLOCK0_ID1; 342 b0p->b0_id[1] = BLOCK0_ID1;
343 b0p->b0_magic_long = (long)B0_MAGIC_LONG; 343 b0p->b0_magic_long = (long)B0_MAGIC_LONG;
344 b0p->b0_magic_int = (int)B0_MAGIC_INT; 344 b0p->b0_magic_int = (int)B0_MAGIC_INT;
345 b0p->b0_magic_short = (short)B0_MAGIC_SHORT; 345 b0p->b0_magic_short = (short)B0_MAGIC_SHORT;
346 b0p->b0_magic_char = B0_MAGIC_CHAR; 346 b0p->b0_magic_char = B0_MAGIC_CHAR;
347 STRNCPY(b0p->b0_version, "VIM ", 4); 347 mch_memmove(b0p->b0_version, "VIM ", 4);
348 STRNCPY(b0p->b0_version + 4, Version, 6); 348 STRNCPY(b0p->b0_version + 4, Version, 6);
349 long_to_char((long)mfp->mf_page_size, b0p->b0_page_size); 349 long_to_char((long)mfp->mf_page_size, b0p->b0_page_size);
350 350
351 #ifdef FEAT_SPELL 351 #ifdef FEAT_SPELL
352 if (!buf->b_spell) 352 if (!buf->b_spell)