Mercurial > vim
changeset 9900:daecffbd0322 v7.4.2224
commit https://github.com/vim/vim/commit/af9c4c9b5761c4c074237d87e2c95713bf721eab
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 17 21:51:56 2016 +0200
patch 7.4.2224
Problem: Compiler warnings with older compiler and 64 bit numbers.
Solution: Add "LL" to large values. (Mike Williams)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 17 Aug 2016 22:00:07 +0200 |
parents | 816999bfd4c8 |
children | c6b969706678 |
files | src/eval.c src/evalfunc.c src/version.c |
diffstat | 3 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -4087,11 +4087,11 @@ eval6( { #ifdef FEAT_NUM64 if (n1 == 0) - n1 = -0x7fffffffffffffff - 1; /* similar to NaN */ + n1 = -0x7fffffffffffffffLL - 1; /* similar to NaN */ else if (n1 < 0) - n1 = -0x7fffffffffffffff; + n1 = -0x7fffffffffffffffLL; else - n1 = 0x7fffffffffffffff; + n1 = 0x7fffffffffffffffLL; #else if (n1 == 0) n1 = -0x7fffffffL - 1L; /* similar to NaN */
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3291,10 +3291,10 @@ f_float2nr(typval_T *argvars, typval_T * if (get_float_arg(argvars, &f) == OK) { # ifdef FEAT_NUM64 - if (f < -0x7fffffffffffffff) - rettv->vval.v_number = -0x7fffffffffffffff; - else if (f > 0x7fffffffffffffff) - rettv->vval.v_number = 0x7fffffffffffffff; + if (f < -0x7fffffffffffffffLL) + rettv->vval.v_number = -0x7fffffffffffffffLL; + else if (f > 0x7fffffffffffffffLL) + rettv->vval.v_number = 0x7fffffffffffffffLL; else rettv->vval.v_number = (varnumber_T)f; # else