gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 107/222: tests: fix narrowing conversion warnings


From: gnunet
Subject: [gnurl] 107/222: tests: fix narrowing conversion warnings
Date: Thu, 07 Nov 2019 00:10:03 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 73089bf7f39e264ab29d9360e430ebe573c39b78
Author: Marcel Raad <address@hidden>
AuthorDate: Tue Sep 24 18:58:23 2019 +0200

    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
---
 tests/unit/unit1303.c | 4 ++--
 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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]