Permalink
Browse files

patch 7.4.2224

Problem:    Compiler warnings with older compiler and 64 bit numbers.
Solution:   Add "LL" to large values. (Mike Williams)
  • Loading branch information...
1 parent d3c907b commit af9c4c9b5761c4c074237d87e2c95713bf721eab @brammool brammool committed Aug 17, 2016
Showing with 9 additions and 7 deletions.
  1. +3 −3 src/eval.c
  2. +4 −4 src/evalfunc.c
  3. +2 −0 src/version.c
View
@@ -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 */
View
@@ -3291,10 +3291,10 @@ f_float2nr(typval_T *argvars, typval_T *rettv)
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
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2224,
+/**/
2223,
/**/
2222,

0 comments on commit af9c4c9

Please sign in to comment.