From 319d1bb581af1c0326c7edf360bc01f386555c2b Mon Sep 17 00:00:00 2001 From: dkulwin Date: Wed, 4 Nov 2015 17:57:53 -0600 Subject: [PATCH] Add cast for GetProcAddress return GetProcAddress returns a FARPROC, *, but compiler likes it better if you give a proper cast to the function value. --- ssh-pkcs11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index e725c10..94cf4d4 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c @@ -601,7 +601,7 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp) goto fail; } - getfunctionlist = GetProcAddress(handle, "C_GetFunctionList"); + getfunctionlist = (CK_RV(*)(CK_FUNCTION_LIST **))GetProcAddress(handle, "C_GetFunctionList"); if (getfunctionlist == NULL) {