diff options
author | James McCoy <jamessan@jamessan.com> | 2017-06-06 14:30:48 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-06-06 21:38:31 -0400 |
commit | af59a290d8fb22a1b33be39c2fe1a6ab6848ee6d (patch) | |
tree | fa80bf31b0556e64aef0a7c18037c3ed8ce8a0c4 | |
parent | bf4de3f6f761bc73801eadffc63a0c18d00c2db7 (diff) | |
download | rneovim-af59a290d8fb22a1b33be39c2fe1a6ab6848ee6d.tar.gz rneovim-af59a290d8fb22a1b33be39c2fe1a6ab6848ee6d.tar.bz2 rneovim-af59a290d8fb22a1b33be39c2fe1a6ab6848ee6d.zip |
*: Fix conversion warnings for tv_get_number*()
-rw-r--r-- | src/nvim/eval.c | 4 | ||||
-rw-r--r-- | src/nvim/eval/typval.c | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 57ec5d1b47..73e19d604d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6691,7 +6691,7 @@ static void f_argv(typval_T *argvars, typval_T *rettv, FunPtr fptr) int idx; if (argvars[0].v_type != VAR_UNKNOWN) { - idx = tv_get_number_chk(&argvars[0], NULL); + idx = (int)tv_get_number_chk(&argvars[0], NULL); if (idx >= 0 && idx < ARGCOUNT) { rettv->vval.v_string = (char_u *)xstrdup( (const char *)alist_name(&ARGLIST[idx])); @@ -7427,7 +7427,7 @@ static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr) return; } - const int startcol = tv_get_number_chk(&argvars[0], NULL); + const colnr_T startcol = tv_get_number_chk(&argvars[0], NULL); if (startcol <= 0) { return; } diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 34fb319d76..4521085519 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -2442,7 +2442,7 @@ varnumber_T tv_get_number_chk(const typval_T *const tv, bool *const ret_error) linenr_T tv_get_lnum(const typval_T *const tv) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { - linenr_T lnum = tv_get_number_chk(tv, NULL); + linenr_T lnum = (linenr_T)tv_get_number_chk(tv, NULL); if (lnum == 0) { // No valid number, try using same function as line() does. int fnum; pos_T *const fp = var2fpos(tv, true, &fnum); diff --git a/src/nvim/option.c b/src/nvim/option.c index ec74ead83c..337d16a55b 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1477,7 +1477,7 @@ do_set ( if (removing) { value = *(long *)varp - value; } - errmsg = (char_u *)set_num_option(opt_idx, varp, value, + errmsg = (char_u *)set_num_option(opt_idx, varp, (long)value, errbuf, sizeof(errbuf), opt_flags); } else if (opt_idx >= 0) { // String. |