diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-24 18:58:23 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-27 08:28:10 +0200 |
commit | 73089bf7f39e264ab29d9360e430ebe573c39b78 (patch) | |
tree | a4162c191e530f805f1227c7ea5c19632437cdf0 /tests/unit | |
parent | c7e6b71e5a9b37760ebc3e718f8d2f49478921d0 (diff) | |
download | curl-73089bf7f39e264ab29d9360e430ebe573c39b78.tar.gz |
tests: fix narrowing conversion warnings
`timediff_t` is 64 bits wide also on 32-bit systems since
commit b1616dad8f0.
Closes https://github.com/curl/curl/pull/4415
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unit1303.c | 4 | ||||
-rw-r--r-- | tests/unit/unit1399.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c index b065683a6..81f894ee0 100644 --- a/tests/unit/unit1303.c +++ b/tests/unit/unit1303.c @@ -68,7 +68,7 @@ struct timetest { int timeout_ms; int connecttimeout_ms; bool connecting; - time_t result; + timediff_t result; const char *comment; }; @@ -138,7 +138,7 @@ UNITTEST_START data->progress.t_startop.tv_usec = 0; for(i = 0; i < sizeof(run)/sizeof(run[0]); i++) { - time_t timeout; + timediff_t timeout; NOW(run[i].now_s, run[i].now_us); TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms); timeout = Curl_timeleft(data, &now, run[i].connecting); diff --git a/tests/unit/unit1399.c b/tests/unit/unit1399.c index 7383fbd86..170e5b759 100644 --- a/tests/unit/unit1399.c +++ b/tests/unit/unit1399.c @@ -50,7 +50,7 @@ static void fake_t_startsingle_time(struct Curl_easy *data, data->progress.t_startsingle.tv_usec = fake_now.tv_usec; } -static bool usec_matches_seconds(time_t time_usec, int expected_seconds) +static bool usec_matches_seconds(timediff_t time_usec, int expected_seconds) { int time_sec = (int)(time_usec / usec_magnitude); bool same = (time_sec == expected_seconds); |