]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gcc: disable picky gcc-8 function pointer warnings in two places
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 May 2018 07:55:34 +0000 (09:55 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 May 2018 21:09:51 +0000 (23:09 +0200)
Reported-by: Rikard Falkeborn
Bug: #2560
Closes #2569

lib/md5.c
src/tool_metalink.c

index 80301a141252856e0c7c8275ac99b6244e0c46e8..3096602b7e9f4c19012595043f1efc665cc6cc28 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -484,6 +484,11 @@ static void MD5_Final(unsigned char *result, MD5_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 HMAC_params Curl_HMAC_MD5[] = {
   {
     (HMAC_hinit_func) MD5_Init,           /* Hash initialization function. */
index 91c5878c91810057d2514234ed16abc6079e9fb5..03f159745228fe37c9ba3ad7f9f680bb718b1660 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -461,6 +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,