From: Viktor Szakats Date: Tue, 6 Jan 2026 11:15:05 +0000 (+0100) Subject: ldap: silence potential unused variable warning (OS400) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea94afe3180c90cd2f4eb89719c53d0e7eed0f56;p=thirdparty%2Fcurl.git ldap: silence potential unused variable warning (OS400) Also: - add `endif` comment. - unfold a line. Follow-up to 64350280d3b9aca54856f73d109aab8f49615de3 #20197 Closes #20302 --- diff --git a/lib/ldap.c b/lib/ldap.c index 616600ce35..e0f233d0c3 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -970,23 +970,20 @@ void Curl_ldap_version(char *buf, size_t bufsz) unsigned int minor = (((unsigned int)api.ldapai_vendor_version - major * 10000) - patch) / 100; - #ifdef __OS400__ - curl_msnprintf(buf, bufsz, "IBMLDAP/%u.%u.%u", - major, minor, patch); - + curl_msnprintf(buf, bufsz, "IBMLDAP/%u.%u.%u", major, minor, patch); ldap_value_free(api.ldapai_extensions); + (void)flavor; #else curl_msnprintf(buf, bufsz, "%s/%u.%u.%u%s", api.ldapai_vendor_name, major, minor, patch, flavor); - ldap_memfree(api.ldapai_vendor_name); ber_memvfree((void **)api.ldapai_extensions); #endif } else curl_msnprintf(buf, bufsz, "LDAP/1"); -#endif +#endif /* USE_WIN32_LDAP */ } /*