Mercurial > vim
changeset 18633:e00e8fbbec4a v8.1.2309
patch 8.1.2309: compiler warning for argument type
Commit: https://github.com/vim/vim/commit/abe12a1a4fce36bfa5dea3a0ce85603432d1905b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 16 20:49:18 2019 +0100
patch 8.1.2309: compiler warning for argument type
Problem: Compiler warning for argument type.
Solution: Use linenr_T and cast to varnumber_T. (John Marriott)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Nov 2019 21:00:03 +0100 |
parents | e39fb99b5331 |
children | ab07a621318f |
files | src/mouse.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mouse.c +++ b/src/mouse.c @@ -3019,7 +3019,7 @@ f_getmousepos(typval_T *argvars UNUSED, varnumber_T winid = 0; varnumber_T winrow = 0; varnumber_T wincol = 0; - varnumber_T line = 0; + linenr_T line = 0; varnumber_T column = 0; if (rettv_dict_alloc(rettv) != OK) @@ -3061,7 +3061,7 @@ f_getmousepos(typval_T *argvars UNUSED, dict_add_number(d, "winid", winid); dict_add_number(d, "winrow", winrow); dict_add_number(d, "wincol", wincol); - dict_add_number(d, "line", line); + dict_add_number(d, "line", (varnumber_T)line); dict_add_number(d, "column", column); } #endif