observed with MSVC2010SP1 16.0.40219.1 in rls-config several times:
sdk\lib\crt\string\wtoi64.c(28) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
sdk\lib\crt\string\wtoi64.c(194) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
the fix is a PARTIAL port of 0.4.15-dev-2951-g
5d8e834897781944dcaf80de6c3df9c2c51212c7
and while touching the file
fix another white-space-glitch.
in sum that brings us 100% in sync in this file to
current master head
0.4.15-dev-3264-g570cedf.
*/
__int64 CDECL _wtoi64_l(const wchar_t *str, _locale_t locale)
{
- ULONGLONG RunningTotal = 0;
+ LONGLONG RunningTotal = 0;
BOOL bMinus = FALSE;
while (iswctype((int)*str, _SPACE)) {
ret = _I64_MIN;
#ifndef _LIBCNT_
*_errno() = ERANGE;
-#endif
+#endif
} else
ret = ret*base + v;
}
if(endptr)
*endptr = (wchar_t*)nptr;
- return negative ? -ret : ret;
+ return negative ? -(__int64)ret : ret;
}
/*********************************************************************