fix warnings in ldap.c