evil: fix warnings.

correct data size for 32/64 compatibility.
This commit is contained in:
ChunEon Park 2015-08-20 15:33:06 +09:00
parent 024812c1a7
commit 6a7e595bf6
1 changed files with 6 additions and 2 deletions

View File

@ -310,7 +310,11 @@ strptime(const char *buf, const char *fmt, struct tm *tm)
continue;
#ifndef TIME_MAX
# define TIME_MAX INT64_MAX
# if INTPTR_MAX == 0xffffffffffffffff
# define TIME_MAX INT64_MAX
# else
# define TIME_MAX INT32_MAX
# endif
#endif
case 's': /* seconds since the epoch */
{
@ -331,7 +335,7 @@ strptime(const char *buf, const char *fmt, struct tm *tm)
} while ((sse * 10 <= TIME_MAX) &&
rulim && *bp >= '0' && *bp <= '9');
if (sse < 0 || (__int64)sse > TIME_MAX)
if (sse < 0 || sse > TIME_MAX)
{
bp = NULL;
continue;