Warning fix - added an (int16) cast to quiet a Windows warning.

This commit is contained in:
mccabe 1998-05-13 22:13:30 +00:00
parent 24e287b80f
commit 6bd5f56755
2 changed files with 4 additions and 4 deletions

View File

@ -1412,10 +1412,10 @@ new_explode(jsdouble time, PRTime *split, JSBool findEquivalent)
#define CYCLE_YEARS 2800L
cycles = (year >= 0) ? year / CYCLE_YEARS
: -1 - (-1 - year) / CYCLE_YEARS;
adjustedYear = year - cycles * CYCLE_YEARS;
adjustedYear = (int16)(year - cycles * CYCLE_YEARS);
} else {
/* Clamp it to the nearest representable year. */
adjustedYear = (year > 0) ? 32767 : - 32768;
adjustedYear = (int16)((year > 0) ? 32767 : - 32768);
}
} else {
adjustedYear = (int16)year;

View File

@ -1412,10 +1412,10 @@ new_explode(jsdouble time, PRMJTime *split, JSBool findEquivalent)
#define CYCLE_YEARS 2800L
cycles = (year >= 0) ? year / CYCLE_YEARS
: -1 - (-1 - year) / CYCLE_YEARS;
adjustedYear = year - cycles * CYCLE_YEARS;
adjustedYear = (int16)(year - cycles * CYCLE_YEARS);
} else {
/* Clamp it to the nearest representable year. */
adjustedYear = (year > 0) ? 32767 : - 32768;
adjustedYear = (int16)((year > 0) ? 32767 : - 32768);
}
} else {
adjustedYear = (int16)year;