diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2018-08-10 17:32:01 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2018-08-11 19:19:04 +0200 |
commit | f31911a8002d3c9de109f5352328d8b6fbf035c2 (patch) | |
tree | 084bb3b0f74a9224deecc1cfbe36df5b1c6d4658 /src | |
parent | 25d2a1bae7871986eabdbe68dc05c5b6473ad4d7 (diff) | |
download | curl-f31911a8002d3c9de109f5352328d8b6fbf035c2.tar.gz |
GCC: silence -Wcast-function-type uniformly
Pointed-out-by: Rikard Falkeborn
Closes https://github.com/curl/curl/pull/2860
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_metalink.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/tool_metalink.c b/src/tool_metalink.c index f8effd374..4c4261472 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -461,16 +461,11 @@ static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx) #endif /* CRYPTO LIBS */ -/* Disable this picky gcc-8 compiler warning */ -#if defined(__GNUC__) && (__GNUC__ >= 8) -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif - const digest_params MD5_DIGEST_PARAMS[] = { { - (Curl_digest_init_func) MD5_Init, - (Curl_digest_update_func) MD5_Update, - (Curl_digest_final_func) MD5_Final, + CURLX_FUNCTION_CAST(Curl_digest_init_func, MD5_Init), + CURLX_FUNCTION_CAST(Curl_digest_update_func, MD5_Update), + CURLX_FUNCTION_CAST(Curl_digest_final_func, MD5_Final), sizeof(MD5_CTX), 16 } @@ -478,9 +473,9 @@ const digest_params MD5_DIGEST_PARAMS[] = { const digest_params SHA1_DIGEST_PARAMS[] = { { - (Curl_digest_init_func) SHA1_Init, - (Curl_digest_update_func) SHA1_Update, - (Curl_digest_final_func) SHA1_Final, + CURLX_FUNCTION_CAST(Curl_digest_init_func, SHA1_Init), + CURLX_FUNCTION_CAST(Curl_digest_update_func, SHA1_Update), + CURLX_FUNCTION_CAST(Curl_digest_final_func, SHA1_Final), sizeof(SHA_CTX), 20 } @@ -488,9 +483,9 @@ const digest_params SHA1_DIGEST_PARAMS[] = { const digest_params SHA256_DIGEST_PARAMS[] = { { - (Curl_digest_init_func) SHA256_Init, - (Curl_digest_update_func) SHA256_Update, - (Curl_digest_final_func) SHA256_Final, + CURLX_FUNCTION_CAST(Curl_digest_init_func, SHA256_Init), + CURLX_FUNCTION_CAST(Curl_digest_update_func, SHA256_Update), + CURLX_FUNCTION_CAST(Curl_digest_final_func, SHA256_Final), sizeof(SHA256_CTX), 32 } |