diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c index cefc42f7fd..5324d6378f 100644 --- a/tests/libtest/lib517.c +++ b/tests/libtest/lib517.c @@ -144,23 +144,20 @@ static CURLcode test_lib517(char *URL) {"Thu, 31-Dec-1969 23:59:58 GMT", -2 }, {"Thu, 31-Dec-1969 23:59:59 GMT", 0 }, /* avoids -1 ! */ #if SIZEOF_TIME_T > 4 - {"Sun, 06 Nov 2044 08:49:37 GMT", (time_t) 2362034977 }, + {"Sun, 06 Nov 2044 08:49:37 GMT", (time_t)2362034977LL }, {"Sun, 06 Nov 3144 08:49:37 GMT", 37074617377 }, #ifndef HAVE_TIME_T_UNSIGNED -#if 0 - /* causes warning on MSVC */ - {"Sun, 06 Nov 1900 08:49:37 GMT", -2182259423 }, -#endif + {"Sun, 06 Nov 1900 08:49:37 GMT", (time_t)-2182259423LL }, {"Sun, 06 Nov 1800 08:49:37 GMT", -5337933023 }, {"Thu, 01-Jan-1583 00:00:00 GMT", -12212553600 }, -#endif +#endif /* HAVE_TIME_T_UNSIGNED */ {"Thu, 01-Jan-1499 00:00:00 GMT", -1 }, #else {"Sun, 06 Nov 2044 08:49:37 GMT", -1 }, -#endif +#endif /* SIZEOF_TIME_T > 4 */ #ifndef HAVE_TIME_T_UNSIGNED {"Sun, 06 Nov 1968 08:49:37 GMT", -36342623 }, -#endif +#endif /* !HAVE_TIME_T_UNSIGNED */ { NULL, 0 } }; @@ -172,8 +169,10 @@ static CURLcode test_lib517(char *URL) for(i = 0; dates[i].input; i++) { time_t out = curl_getdate(dates[i].input, NULL); if(out != dates[i].output) { - curl_mprintf("WRONGLY %s => %ld (instead of %ld)\n", - dates[i].input, (long)out, (long)dates[i].output); + curl_mprintf("WRONGLY %s => %" CURL_FORMAT_CURL_OFF_T + " (instead of %" CURL_FORMAT_CURL_OFF_T ")\n", + dates[i].input, + (curl_off_t)out, (curl_off_t)dates[i].output); error++; } }