From 2863803857d884c319ba7f57051c61b626cb9208 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 27 Mar 2021 15:00:34 +0000 Subject: [PATCH] Cast GetVolumeInformationByHandleW to (void *) The 64-bit Windows build was complaining of pointer type mismatches but I'm fairly sure it was a false positive: ../ssl.c: In function 'openconnect_passphrase_from_fsid': ../ssl.c:598:9: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(void *, WCHAR *, DWORD, DWORD *, DWORD *, DWORD *, WCHAR *, DWORD)' {aka 'int (*)(void *, short unsigned int *, long unsigned int, long unsigned int *, long unsigned int *, long unsigned int *, short unsigned int *, long unsigned int)'} [-Wcast-function-type] 598 | func = (GVIBH)GetProcAddress(kernlib, "GetVolumeInformationByHandleW"); | ^ Signed-off-by: David Woodhouse --- ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl.c b/ssl.c index f68e91f5..dc81887f 100644 --- a/ssl.c +++ b/ssl.c @@ -595,7 +595,7 @@ int openconnect_passphrase_from_fsid(struct openconnect_info *vpninfo) _("Could not obtain file system ID for passphrase\n")); return -EOPNOTSUPP; } - func = (GVIBH)GetProcAddress(kernlib, "GetVolumeInformationByHandleW"); + func = (void *)GetProcAddress(kernlib, "GetVolumeInformationByHandleW"); FreeLibrary(kernlib); if (!func) goto notsupp; -- 2.49.0