mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:53:32 +03:00
cmake: really enable warnings with clang
Even though `PICKY_COMPILER=ON` is the default, warnings were not enabled when using llvm/clang, because `CMAKE_COMPILER_IS_CLANG` was always false (in my tests at least). This is the single use of this variable in curl, and in a different place we already use `CMAKE_C_COMPILER_ID MATCHES "Clang"`, which works as expected, so change the condition to use that instead. Also fix the warnings uncovered by the above: - lib: add casts to silence clang warnings - schannel: add casts to silence clang warnings in ALPN code Assuming the code is correct, solve the warnings with a cast. This particular build case isn't CI tested. There is a chance the warning is relevant for some platforms, perhaps Windows 32-bit ARM7. Closes #9783
This commit is contained in:
parent
df77eff278
commit
811c799f2d
4 changed files with 10 additions and 10 deletions
10
lib/setopt.c
10
lib/setopt.c
|
|
@ -406,7 +406,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
arg = va_arg(param, long);
|
||||
if((arg < CURL_TIMECOND_NONE) || (arg >= CURL_TIMECOND_LAST))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.timecondition = (curl_TimeCond)arg;
|
||||
data->set.timecondition = (unsigned char)(curl_TimeCond)arg;
|
||||
break;
|
||||
case CURLOPT_TIMEVALUE:
|
||||
/*
|
||||
|
|
@ -1135,7 +1135,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
arg = va_arg(param, long);
|
||||
if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_SOCKS5_HOSTNAME))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.proxytype = (curl_proxytype)arg;
|
||||
data->set.proxytype = (unsigned char)(curl_proxytype)arg;
|
||||
break;
|
||||
|
||||
case CURLOPT_PROXY_TRANSFER_MODE:
|
||||
|
|
@ -1234,7 +1234,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
arg = va_arg(param, long);
|
||||
if((arg < CURLFTPMETHOD_DEFAULT) || (arg >= CURLFTPMETHOD_LAST))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.ftp_filemethod = (curl_ftpfile)arg;
|
||||
data->set.ftp_filemethod = (unsigned char)(curl_ftpfile)arg;
|
||||
break;
|
||||
case CURLOPT_FTPPORT:
|
||||
/*
|
||||
|
|
@ -1261,7 +1261,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
arg = va_arg(param, long);
|
||||
if((arg < CURLFTPSSL_CCC_NONE) || (arg >= CURLFTPSSL_CCC_LAST))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.ftp_ccc = (curl_ftpccc)arg;
|
||||
data->set.ftp_ccc = (unsigned char)(curl_ftpccc)arg;
|
||||
break;
|
||||
|
||||
case CURLOPT_FTP_SKIP_PASV_IP:
|
||||
|
|
@ -1289,7 +1289,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
arg = va_arg(param, long);
|
||||
if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.ftpsslauth = (curl_ftpauth)arg;
|
||||
data->set.ftpsslauth = (unsigned char)(curl_ftpauth)arg;
|
||||
break;
|
||||
case CURLOPT_KRBLEVEL:
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue