diff --git a/lib/ftp.c b/lib/ftp.c index ac7a4bba04..c3de29f0c4 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2760,8 +2760,8 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data, ftpc->count1 = 1; break; default: - failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %ld", - data->set.ftpsslauth); + failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %d", + (int)data->set.ftpsslauth); return CURLE_UNKNOWN_OPTION; /* we do not know what to do */ } result = Curl_pp_sendf(data, &ftpc->pp, "AUTH %s", diff --git a/lib/setopt.c b/lib/setopt.c index 7030ae1418..5464d07f79 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -883,7 +883,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, case CURLOPT_FTP_SSL_CCC: if((arg < CURLFTPSSL_CCC_NONE) || (arg >= CURLFTPSSL_CCC_LAST)) return CURLE_BAD_FUNCTION_ARGUMENT; - data->set.ftp_ccc = arg; + data->set.ftp_ccc = (unsigned char)arg; break; case CURLOPT_FTP_SKIP_PASV_IP: @@ -900,7 +900,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, */ if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST)) return CURLE_BAD_FUNCTION_ARGUMENT; - data->set.ftpsslauth = arg; + data->set.ftpsslauth = (unsigned char)arg; break; case CURLOPT_ACCEPTTIMEOUT_MS: /* diff --git a/lib/urldata.h b/lib/urldata.h index 7d7236cfac..1f3312be0f 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -1456,8 +1456,8 @@ struct UserDefined { #ifndef CURL_DISABLE_FTP timediff_t accepttimeout; /* in milliseconds, 0 means no timeout */ unsigned char ftp_filemethod; /* how to get to a file: curl_ftpfile */ - long ftpsslauth; /* what AUTH XXX to try: curl_ftpauth */ - long ftp_ccc; /* FTP CCC options: curl_ftpccc */ + unsigned char ftpsslauth; /* what AUTH XXX to try: curl_ftpauth */ + unsigned char ftp_ccc; /* FTP CCC options: curl_ftpccc */ #endif #if !defined(CURL_DISABLE_FTP) || defined(USE_SSH) struct curl_slist *quote; /* after connection is established */