To: vim_dev@googlegroups.com Subject: Patch 8.1.1271 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1271 (after 8.1.1270) Problem: Compiler warnings for use of STRNCPY(). (John Marriott) Solution: Use mch_memmove() instead of STRNCPY(). Files: src/search.c *** ../vim-8.1.1270/src/search.c 2019-05-04 21:08:17.119814244 +0200 --- src/search.c 2019-05-05 12:59:29.260505205 +0200 *************** *** 1415,1424 **** { // Use a space to draw the composing char on. msgbuf[1] = ' '; ! STRNCPY(msgbuf + 2, p, STRLEN(p)); } else ! STRNCPY(msgbuf + 1, p, STRLEN(p)); if (spats[0].off.line || spats[0].off.end || spats[0].off.off) { p = msgbuf + STRLEN(p) + 1; --- 1415,1424 ---- { // Use a space to draw the composing char on. msgbuf[1] = ' '; ! mch_memmove(msgbuf + 2, p, STRLEN(p)); } else ! 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,5012 **** else vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt); } ! STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t)); if (dirc == '?' && cur == 100) cur = -1; --- 5006,5012 ---- else vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt); } ! mch_memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t)); if (dirc == '?' && cur == 100) cur = -1; *** ../vim-8.1.1270/src/version.c 2019-05-04 21:08:17.119814244 +0200 --- src/version.c 2019-05-05 13:00:50.092066257 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1271, /**/ -- VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur and his knights seemed hopeless, when, suddenly ... the animator suffered a fatal heart attack. ANIMATOR: Aaaaagh! VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could continue. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///