From: YX Hao Date: Wed, 6 Dec 2023 14:42:00 +0000 (+0800) Subject: lib: fix variable undeclared error caused by `infof` changes X-Git-Tag: curl-8_6_0~252 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a17f041bea199a67c45f756652a6d1aecda2573a;p=thirdparty%2Fcurl.git lib: fix variable undeclared error caused by `infof` changes `--disable-verbose` yields `CURL_DISABLE_VERBOSE_STRINGS` defined. `infof` isn't `Curl_nop_stmt` anymore: dac293c. Follow-up to dac293c Closes #12470 --- diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c index 02e36ea5ed..4696f29add 100644 --- a/lib/vauth/digest_sspi.c +++ b/lib/vauth/digest_sspi.c @@ -211,8 +211,10 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, if(status == SEC_E_INSUFFICIENT_MEMORY) return CURLE_OUT_OF_MEMORY; +#if !defined(CURL_DISABLE_VERBOSE_STRINGS) infof(data, "schannel: InitializeSecurityContext failed: %s", Curl_sspi_strerror(status, buffer, sizeof(buffer))); +#endif return CURLE_AUTH_ERROR; } @@ -603,8 +605,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, if(status == SEC_E_INSUFFICIENT_MEMORY) return CURLE_OUT_OF_MEMORY; +#if !defined(CURL_DISABLE_VERBOSE_STRINGS) infof(data, "schannel: InitializeSecurityContext failed: %s", Curl_sspi_strerror(status, buffer, sizeof(buffer))); +#endif return CURLE_AUTH_ERROR; } diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index ae7f2956da..8e1d5be8d8 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -2332,10 +2332,10 @@ schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data, else { #ifndef CURL_DISABLE_VERBOSE_STRINGS char buffer[STRERROR_LEN]; -#endif - *err = CURLE_RECV_ERROR; infof(data, "schannel: failed to read data from server: %s", Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); +#endif + *err = CURLE_RECV_ERROR; goto cleanup; } }