mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Fix -Wcast-function-type warnings on Windows/MinGW
After de8feb1f3a
, some warnings remained
that were only visible when using GCC on Windows. Fix those as well.
Note that the ecpg test source files don't use the full pg_config.h,
so we can't use pg_funcptr_t there but have to do it the long way.
This commit is contained in:
@ -1521,7 +1521,7 @@ pg_SSPI_recvauth(Port *port)
|
||||
(errmsg("could not load library \"%s\": error code %lu",
|
||||
"SECUR32.DLL", GetLastError())));
|
||||
|
||||
_QuerySecurityContextToken = (QUERY_SECURITY_CONTEXT_TOKEN_FN)
|
||||
_QuerySecurityContextToken = (QUERY_SECURITY_CONTEXT_TOKEN_FN) (pg_funcptr_t)
|
||||
GetProcAddress(secur32, "QuerySecurityContextToken");
|
||||
if (_QuerySecurityContextToken == NULL)
|
||||
{
|
||||
@ -2522,7 +2522,7 @@ InitializeLDAPConnection(Port *port, LDAP **ldap)
|
||||
ldap_unbind(*ldap);
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
_ldap_start_tls_sA = (__ldap_start_tls_sA) GetProcAddress(ldaphandle, "ldap_start_tls_sA");
|
||||
_ldap_start_tls_sA = (__ldap_start_tls_sA) (pg_funcptr_t) GetProcAddress(ldaphandle, "ldap_start_tls_sA");
|
||||
if (_ldap_start_tls_sA == NULL)
|
||||
{
|
||||
ereport(LOG,
|
||||
|
Reference in New Issue
Block a user