]> granicus.if.org Git - curl/commitdiff
easy: silence compiler warning
authorJay Satiro <raysatiro@yahoo.com>
Tue, 4 Apr 2017 06:43:21 +0000 (02:43 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 4 Apr 2017 06:43:21 +0000 (02:43 -0400)
Safe to silence warning adding time delta of poll, which can trigger on
Windows since sizeof time_t > sizeof long.

warning C4244: '+=' : conversion from 'time_t' to 'long', possible loss
of data

lib/easy.c

index b3159d1a28e41e862c5efc16d1b46b0379821dac..8822b42c8bbac4ed3a3e28c10eb281991840d21e 100644 (file)
@@ -619,7 +619,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
         /* If nothing updated the timeout, we decrease it by the spent time.
          * If it was updated, it has the new timeout time stored already.
          */
-        ev->ms += curlx_tvdiff(after, before);
+        ev->ms += (long)curlx_tvdiff(after, before);
 
     }
     else