1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

dirmngr,w32: Silence compiler warnings for the LDAP API.

--
This commit is contained in:
Werner Koch 2022-06-03 15:36:58 +02:00
parent dfc01118ce
commit cc1d475f98
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 26 additions and 2 deletions

View file

@ -544,8 +544,13 @@ my_ldap_connect (parsed_uri_t uri, LDAP **ldap_connp,
}
else if (bindname)
{
npth_unprotect ();
lerr = ldap_simple_bind_s (ldap_conn, bindname, password);
/* Older Windows header dont have the const for the last two args.
* Thus we need to cast to avoid warnings. */
lerr = ldap_simple_bind_s (ldap_conn,
(char * const)bindname,
(char * const)password);
npth_protect ();
if (lerr != LDAP_SUCCESS)
{