I looked at this windows build log showing these two compiler warnings
.\telnet.c(1455) : warning C4267: 'function' : conversion from 'size_t' to 'DWORD', possible loss of data
.\telnet.c(1474) : warning C4267: 'function' : conversion from 'size_t' to 'DWORD', possible loss of data
7.52.1 and current 7.53.0-dev in git master
curl-fix-telnet-warnings.patch, also inlined here:
@@ -3,11 +3,11 @@
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <email@example.com>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <firstname.lastname@example.org>, et al.
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.haxx.se/docs/copyright.html.
@@ -1414,11 +1414,11 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
wait_timeout = 1000;
/* Keep on listening and act on events */
- const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size);
+ const DWORD buf_size = (DWORD)CURL_BUFSIZE(data->set.buffer_size);
waitret = WaitForMultipleObjects(obj_count, objs, FALSE, wait_timeout);
telnet: fix windows compiler warnings
Thumbs-up-by: Jay Satiro