]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ldap: silence potential unused variable warning (OS400)
authorViktor Szakats <commit@vsz.me>
Tue, 6 Jan 2026 11:15:05 +0000 (12:15 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 13 Jan 2026 23:55:04 +0000 (00:55 +0100)
Also:
- add `endif` comment.
- unfold a line.

Follow-up to 64350280d3b9aca54856f73d109aab8f49615de3 #20197

Closes #20302

lib/ldap.c

index 616600ce3590f6fba79131f5a2f1eda0d37ceda8..e0f233d0c38cca023a5f0d39124fa00ad6f5bb3e 100644 (file)
@@ -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 */
 }
 
 /*