diff options
author | James McCoy <jamessan@jamessan.com> | 2017-06-07 14:05:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 14:05:46 +0000 |
commit | d3d0c9a7b11cad3f277f732dee6c782d1d911b48 (patch) | |
tree | 9440bfffd38ff3cdf98127c95764db1f84adadb7 /src/nvim/eval/executor.c | |
parent | cb0abce5be1dd6212425589b61826332834dc977 (diff) | |
parent | ca1ba1085a2be1f8963b48c9ccf3936359959924 (diff) | |
download | rneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.tar.gz rneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.tar.bz2 rneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.zip |
Merge pull request #5621 from jamessan/vim-7.4.1975
vim-patch:7.4.1975,7.4.1976,7.4.1977,7.4.1978,7.4.1979,7.4.1986,7.4.2029,7.4.2224,8.0.0219,8.0.0614
Diffstat (limited to 'src/nvim/eval/executor.c')
-rw-r--r-- | src/nvim/eval/executor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index 91bb61323f..99298cbbcf 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -25,7 +25,7 @@ char *e_listidx = N_("E684: list index out of range: %" PRId64); /// @return OK or FAIL. int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, const char *const op) - FUNC_ATTR_NONNULL_ALL + FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NO_SANITIZE_UNDEFINED { // Can't do anything with a Funcref, a Dict or special value on the right. if (tv2->v_type != VAR_FUNC && tv2->v_type != VAR_DICT) { @@ -55,7 +55,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, // nr += nr or nr -= nr varnumber_T n = tv_get_number(tv1); if (tv2->v_type == VAR_FLOAT) { - float_T f = n; + float_T f = (float_T)n; if (*op == '+') { f += tv2->vval.v_float; @@ -99,7 +99,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, } const float_T f = (tv2->v_type == VAR_FLOAT ? tv2->vval.v_float - : tv_get_number(tv2)); + : (float_T)tv_get_number(tv2)); if (*op == '+') { tv1->vval.v_float += f; } else { |