cURL / Mailing Lists / curl-library / Single Mail


Compilation warning in ftp.c

From: Steve Holme <>
Date: Tue, 24 Sep 2013 20:47:49 +0100

Hi all,


Over the last few weeks I've been concentrating on adding more email related
test cases but along the way I have also been fixing up a few minor
compilation warnings from the auto builds.


One that isn't obvious as to whether it should be fixed or not is in ftp.c
<ftp://ftp.c> at line 4253.


The variable "dirlen" is defined as a size_t (unsigned) however,
curl_easy_unescape() is expecting a signed int. The existing code runs the
value through curlx_sztosi() which is designed to convert from a signed
size_t (aka ssize_t) to a signed int. As such the IRIX compiler is whinging
about it. Now I don't run IRIX or any *nix builds for that matter so I can't
test my proposed fix on those platforms but my question is.


Should we be using curlx_uztosi() instead of curlx_sztosi() as per my
proposed and attached fix?


I didn't want to push this is case there was a reason for not doing it.


Kind Regards



Received on 2013-09-24