# HG changeset patch # User Bram Moolenaar # Date 1546549206 -3600 # Node ID 21580db06cf33bcdfc3b60e0f7cf1a60f67a3b9b # Parent bcb99492a20f4d1904298e46b1e17a1e2f588d8a patch 8.1.0684: warnings from 64-bit compiler commit https://github.com/vim/vim/commit/4b7214ea7834c72188f4a7b0b76b49b81fef7d27 Author: Bram Moolenaar Date: Thu Jan 3 21:55:32 2019 +0100 patch 8.1.0684: warnings from 64-bit compiler Problem: Warnings from 64-bit compiler. Solution: Add type casts. (Mike Williams) diff --git a/src/memline.c b/src/memline.c --- a/src/memline.c +++ b/src/memline.c @@ -562,7 +562,7 @@ ml_set_crypt_key( /* Skip data block with negative block number. * Should not happen, because of the ml_preserve() * above. Get same block again for next index. */ - ++idx; + ++idx; continue; } @@ -3350,7 +3350,7 @@ adjust_text_props_for_delete( internal_error("no text property below deleted line"); return; } - this_props_len = line_size - textlen; + this_props_len = line_size - (int)textlen; } found = FALSE; @@ -3489,7 +3489,7 @@ ml_delete_int(buf_T *buf, linenr_T lnum, if ((long)textlen < line_size) { - textprop_save_len = line_size - textlen; + textprop_save_len = line_size - (int)textlen; textprop_save = vim_memsave((char_u *)dp + line_start + textlen, textprop_save_len); } @@ -5379,7 +5379,7 @@ ml_updatechunk( // the text prop info would also be counted. Go over the // lines. for (i = end_idx; i < idx; ++i) - size += STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1; + size += (int)STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1; } else #endif @@ -5588,7 +5588,7 @@ ml_find_line_or_offset(buf_T *buf, linen // lengths. len = 0; for (i = start_idx; i <= idx; ++i) - len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1; + len += (int)STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1; } else #endif diff --git a/src/textprop.c b/src/textprop.c --- a/src/textprop.c +++ b/src/textprop.c @@ -262,9 +262,9 @@ f_prop_add(typval_T *argvars, typval_T * if (lnum == end_lnum) length = end_col - col; else - length = textlen - col + 1; + length = (int)textlen - col + 1; if (length > (long)textlen) - length = textlen; // can include the end-of-line + length = (int)textlen; // can include the end-of-line if (length < 0) length = 0; // zero-width property @@ -972,7 +972,7 @@ adjust_prop_columns( if (dirty) { curbuf->b_ml.ml_flags |= ML_LINE_DIRTY; - curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T); + curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T); } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -800,6 +800,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 684, +/**/ 683, /**/ 682,