changeset 29477:6387e75a4a6b v9.0.0080

patch 9.0.0080: compiler warning for size_t to int conversion Commit: https://github.com/vim/vim/commit/0494789ecee9e2a973f48426f7a69fb96378fa8a Author: Mike Williams <mikew@globalgraphics.com> Date: Tue Jul 26 16:03:42 2022 +0100 patch 9.0.0080: compiler warning for size_t to int conversion Problem: Compiler warning for size_t to int conversion. Solution: Add type casts. (Mike Williams, closes https://github.com/vim/vim/issues/10795)
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Jul 2022 17:15:03 +0200
parents 2586309508be
children 5d3972281e92
files src/charset.c src/drawline.c src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c
+++ b/src/charset.c
@@ -1095,7 +1095,7 @@ win_lbr_chartabsize(
 		char_u *p = ((char_u **)wp->w_buffer->b_textprop_text.ga_data)[
 							       -tp->tp_id - 1];
 		// TODO: count screen cells
-		cts->cts_cur_text_width = STRLEN(p);
+		cts->cts_cur_text_width = (int)STRLEN(p);
 		size += cts->cts_cur_text_width;
 		break;
 	    }
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1524,7 +1524,7 @@ win_line(
 			if (p != NULL)
 			{
 			    p_extra = p;
-			    n_extra = STRLEN(p);
+			    n_extra = (int)STRLEN(p);
 			    extra_attr = used_attr;
 			    n_attr = n_extra;
 			    text_prop_attr = 0;
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    80,
+/**/
     79,
 /**/
     78,