To: vim_dev@googlegroups.com Subject: Patch 8.1.0703 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0703 Problem: Compiler warnings with 64-bit compiler. Solution: Change types, add type casts. (Mike Williams) Files: src/textprop.c, src/undo.c *** ../vim-8.1.0702/src/textprop.c 2019-01-06 12:54:51.823033166 +0100 --- src/textprop.c 2019-01-08 20:11:08.036374758 +0100 *************** *** 357,368 **** static void set_text_props(linenr_T lnum, char_u *props, int len) { ! char_u *text; ! char_u *newtext; ! size_t textlen; text = ml_get(lnum); ! textlen = STRLEN(text) + 1; newtext = alloc(textlen + len); if (newtext == NULL) return; --- 357,368 ---- static void set_text_props(linenr_T lnum, char_u *props, int len) { ! char_u *text; ! char_u *newtext; ! int textlen; text = ml_get(lnum); ! textlen = (int)STRLEN(text) + 1; newtext = alloc(textlen + len); if (newtext == NULL) return; *** ../vim-8.1.0702/src/undo.c 2019-01-04 15:09:52.918373097 +0100 --- src/undo.c 2019-01-08 20:12:48.227677401 +0100 *************** *** 1205,1213 **** /* buffer-specific data */ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4); len = buf->b_u_line_ptr.ul_line == NULL ! ? 0 : STRLEN(buf->b_u_line_ptr.ul_line); undo_write_bytes(bi, (long_u)len, 4); ! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len) == FAIL) return FAIL; undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4); undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4); --- 1205,1214 ---- /* buffer-specific data */ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4); len = buf->b_u_line_ptr.ul_line == NULL ! ? 0L : (long)STRLEN(buf->b_u_line_ptr.ul_line); undo_write_bytes(bi, (long_u)len, 4); ! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len) ! == FAIL) return FAIL; undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4); undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4); *** ../vim-8.1.0702/src/version.c 2019-01-07 22:09:54.439460880 +0100 --- src/version.c 2019-01-08 20:13:34.287356560 +0100 *************** *** 801,802 **** --- 801,804 ---- { /* Add new patch number below this line */ + /**/ + 703, /**/ -- hundred-and-one symptoms of being an internet addict: 131. You challenge authority and society by portnuking people /// 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 ///