]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: fix build for CURL_DISABLE_VERBOSE_STRINGS
authorJay Satiro <raysatiro@yahoo.com>
Fri, 10 May 2024 23:14:29 +0000 (19:14 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 10 May 2024 23:14:29 +0000 (19:14 -0400)
This is a follow-up to b7c7dffe which changed the FTP state change
verbose debug text (aka infof) to tracing debug text (aka trc).

Prior to this change if libcurl was without DEBUGBUILD and built with
CURL_DISABLE_VERBOSE_STRINGS (ie --disable-verbose) the build would
error.

Caught by Circle CI job openssl-no-verbose.

lib/ftp.c

index 049ea2c5c231647bd6644cb738a8d15ebfc124d5..b88d4d7b0f1e23cb54d11ed3acc9db645e31b197 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -154,7 +154,9 @@ static void _ftp_state(struct Curl_easy *data,
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
-  (void) lineno;
+#ifdef DEBUGBUILD
+  (void)lineno;
+#endif
 #else /* CURL_DISABLE_VERBOSE_STRINGS */
   if(ftpc->state != newstate)
 #ifdef DEBUGBUILD