summaryrefslogtreecommitdiff
path: root/lib/system_win32.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-09 17:19:24 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-11 19:19:03 +0200
commit25d2a1bae7871986eabdbe68dc05c5b6473ad4d7 (patch)
tree5a588c693611fc79f2ff7f3844e3f77ef47ea1c3 /lib/system_win32.c
parent2a278fd73573d025e6d5ebde8b10d446c27d6d3f (diff)
downloadcurl-25d2a1bae7871986eabdbe68dc05c5b6473ad4d7.tar.gz
Silence GCC 8 cast-function-type warnings
On Windows, casting between unrelated function types is fine and sometimes even necessary, so just use an intermediate cast to (void (*) (void)) to silence the warning as described in [0]. [0] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/2860
Diffstat (limited to 'lib/system_win32.c')
-rw-r--r--lib/system_win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system_win32.c b/lib/system_win32.c
index 89d648516..6b8004e5b 100644
--- a/lib/system_win32.c
+++ b/lib/system_win32.c
@@ -26,6 +26,7 @@
#include <curl/curl.h>
#include "system_win32.h"
+#include "warnless.h"
/* The last #include files should be: */
#include "curl_memory.h"
@@ -280,7 +281,9 @@ HMODULE Curl_load_library(LPCTSTR filename)
/* Attempt to find LoadLibraryEx() which is only available on Windows 2000
and above */
- pLoadLibraryEx = (LOADLIBRARYEX_FN) GetProcAddress(hKernel32, LOADLIBARYEX);
+ pLoadLibraryEx =
+ CURLX_FUNCTION_CAST(LOADLIBRARYEX_FN,
+ (GetProcAddress(hKernel32, LOADLIBARYEX)));
/* Detect if there's already a path in the filename and load the library if
there is. Note: Both back slashes and forward slashes have been supported