To: vim_dev@googlegroups.com Subject: Patch 7.4.2067 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2067 Problem: Compiler warning for char/char_u conversion. (Tony Mechelynck) Inefficient code. Solution: Use more lines to fill with spaces. (Nikolai Pavlov) Add type cast. Files: src/quickfix.c *** ../vim-7.4.2066/src/quickfix.c 2016-07-17 22:25:31.601874049 +0200 --- src/quickfix.c 2016-07-18 22:16:07.024693199 +0200 *************** *** 2593,2601 **** if (title != NULL) { ! while (STRLEN(buf) < 34) ! STRCAT(buf, " "); ! vim_strcat(buf, title, IOSIZE); } trunc_string(buf, buf, Columns - 1, IOSIZE); msg(buf); --- 2593,2606 ---- if (title != NULL) { ! size_t len = STRLEN(buf); ! ! if (len < 34) ! { ! vim_memset(buf + len, ' ', 34 - len); ! buf[34] = NUL; ! } ! vim_strcat(buf, (char_u *)title, IOSIZE); } trunc_string(buf, buf, Columns - 1, IOSIZE); msg(buf); *** ../vim-7.4.2066/src/version.c 2016-07-17 23:34:16.684434869 +0200 --- src/version.c 2016-07-18 22:10:19.708287076 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2067, /**/ -- I still remember when I gave up Smoking, Drinking and Sex. It was the most *horrifying* hour of my life! /// 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 ///