# HG changeset patch # User Bram Moolenaar # Date 1288174680 -7200 # Node ID c6fe65c000d27b9ddb0cbdffe43cf188b7a51f2e # Parent 56ecdb792c3353d9fc587a515fa4991e69363dd5 updated for version 7.3.037 Problem: Compiler warnings for loss of data. (Mike Williams) Solution: Add type casts. diff --git a/src/getchar.c b/src/getchar.c --- a/src/getchar.c +++ b/src/getchar.c @@ -3922,7 +3922,7 @@ showmap(mp, local) if (mapchars != NULL) { msg_puts(mapchars); - len = STRLEN(mapchars); + len = (int)STRLEN(mapchars); vim_free(mapchars); } diff --git a/src/if_py_both.h b/src/if_py_both.h --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -154,7 +154,7 @@ writer(writefn fn, char_u *str, PyInt n) { PyInt len = ptr - str; - if (ga_grow(&io_ga, len + 1) == FAIL) + if (ga_grow(&io_ga, (int)(len + 1)) == FAIL) break; mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len); @@ -166,10 +166,10 @@ writer(writefn fn, char_u *str, PyInt n) } /* Put the remaining text into io_ga for later printing. */ - if (n > 0 && ga_grow(&io_ga, n + 1) == OK) + if (n > 0 && ga_grow(&io_ga, (int)(n + 1)) == OK) { mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)n); - io_ga.ga_len += n; + io_ga.ga_len += (int)n; } } diff --git a/src/os_win32.c b/src/os_win32.c --- a/src/os_win32.c +++ b/src/os_win32.c @@ -224,7 +224,8 @@ get_exe_name(void) if (exe_path == NULL && exe_name != NULL) { - exe_path = vim_strnsave(exe_name, gettail_sep(exe_name) - exe_name); + exe_path = vim_strnsave(exe_name, + (int)(gettail_sep(exe_name) - exe_name)); if (exe_path != NULL) { /* Append our starting directory to $PATH, so that when doing @@ -2374,7 +2375,7 @@ fname_case( /* To avoid a slow failure append "\*" when searching a directory, * server or network share. */ STRCPY(szTrueNameTemp, szTrueName); - slen = strlen(szTrueNameTemp); + slen = (int)strlen(szTrueNameTemp); if (*porig == psepc && slen + 2 < _MAX_PATH) STRCPY(szTrueNameTemp + slen, "\\*"); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 37, +/**/ 36, /**/ 35,