diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-22 19:04:18 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-23 09:44:35 +0200 |
commit | 527461285f54bca59356e2c550d55ed9606e96d1 (patch) | |
tree | fcddc2509c4de4c6ff2eaf8f8fe2359a59f37d6f /lib/vtls/mesalink.c | |
parent | 96a3ab7bc8fcf731322e6d141f5eb8e4ad856e1a (diff) |
vtls: fix narrowing conversion warnings
Curl_timeleft returns `timediff_t`, which is 64 bits wide also on
32-bit systems since commit b1616dad8f0.
Closes https://github.com/curl/curl/pull/4398
Diffstat (limited to 'lib/vtls/mesalink.c')
-rw-r--r-- | lib/vtls/mesalink.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/vtls/mesalink.c b/lib/vtls/mesalink.c index 9507888bd..cab1e390b 100644 --- a/lib/vtls/mesalink.c +++ b/lib/vtls/mesalink.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2017 - 2018, Yiming Jing, <jingyiming@baidu.com> - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -494,7 +494,7 @@ mesalink_connect_common(struct connectdata *conn, int sockindex, struct Curl_easy *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; - time_t timeout_ms; + timediff_t timeout_ms; int what; /* check if the connection has already been established */ @@ -543,7 +543,8 @@ mesalink_connect_common(struct connectdata *conn, int sockindex, : CURL_SOCKET_BAD; what = Curl_socket_check( - readfd, CURL_SOCKET_BAD, writefd, nonblocking ? 0 : timeout_ms); + readfd, CURL_SOCKET_BAD, writefd, + nonblocking ? 0 : (time_t)timeout_ms); if(what < 0) { /* fatal error */ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); |