]> granicus.if.org Git - curl/commitdiff
ssh: fix narrowing conversion warning
authorMarcel Raad <raad@teamviewer.com>
Thu, 30 Mar 2017 16:41:50 +0000 (18:41 +0200)
committerMarcel Raad <raad@teamviewer.com>
Thu, 30 Mar 2017 16:45:28 +0000 (18:45 +0200)
'left' is used as time_t but declared as long.
MinGW complains:
error: conversion to 'long int' from 'time_t {aka long long int}' may alter
its value [-Werror=conversion]
Changed the declaration to time_t.

lib/ssh.c

index 6cd5d876922812b601658bb8d18aee7f208d4a33..72fa06af738e1f78d21fb25c4fa0c4f47566083f 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2822,7 +2822,7 @@ static CURLcode ssh_block_statemach(struct connectdata *conn,
 
   while((sshc->state != SSH_STOP) && !result) {
     bool block;
-    long left;
+    time_t left;
     struct timeval now = Curl_tvnow();
 
     result = ssh_statemach_act(conn, &block);