0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 7.4.2224

Problem:    Compiler warnings with older compiler and 64 bit numbers.
Solution:   Add "LL" to large values. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2016-08-17 21:51:56 +02:00
parent d3c907b5d2
commit af9c4c9b57
3 changed files with 9 additions and 7 deletions

View File

@@ -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 File

@@ -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 File

@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2224,
/**/
2223,
/**/