]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
windows: test non-verbose builds, fix fallouts
authorViktor Szakats <commit@vsz.me>
Wed, 21 Jan 2026 12:55:32 +0000 (13:55 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 21 Jan 2026 14:25:40 +0000 (15:25 +0100)
- schannel: fix mixed-up declaration. (originally fenced infof for
  verbose, then changed to failf with the fence kept, then fence
  removed and variable marked as verbose, when in fact it's not, but
  not tested and caught in CI.
- fix two other fallouts.
- GHA/windows: disable verbose strings in a mingw job.
- appveyor: disable verbose strings in an MSVC job.
- appveyor: add way to pass any CMake option per-job.

Cherry-picked from #20387
Follow-up to 61093e2a819d26b7ddf309baef264b9e50c6c56f #20353

Closes #20388

.github/workflows/windows.yml
appveyor.sh
appveyor.yml
lib/mqtt.c
lib/multi.c
lib/vtls/schannel.c

index 8f10faf62f9c731127f08cad5c965b31821b494a..a9f823af8e10230806e8be67dad09b544b9844fb 100644 (file)
@@ -436,7 +436,7 @@ jobs:
             env: 'x86_64'
             ver: '9.5.0'
             url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z'
-            config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF'
+            config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DCURL_DISABLE_VERBOSE_STRINGS=ON'
             type: 'Release'
             tflags: 'skiprun'
           - name: 'schannel mbedtls U'  # mingw-w64 6.0
index a5af2ef3088b1187d31e6bcd564fe57b356b8d7b..732d803d356bb4f5b191648425fec6e74cc527ed 100644 (file)
@@ -89,6 +89,7 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
       -DCURL_USE_SCHANNEL="${SCHANNEL}" \
       -DCURL_USE_OPENSSL="${OPENSSL}" \
       -DCURL_USE_LIBPSL=OFF \
+      ${CMAKE_OPTIONS:-} \
       ${options} \
       || { cat "${root}"/_bld/CMakeFiles/CMake* 2>/dev/null; false; }
     [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2013' ] && cd ..
index a0e21b2e1ea2ac7e5a8111f3006366f704f71507..79eb9094b827e403619983f4f0427a8560811b62 100644 (file)
@@ -41,6 +41,7 @@ environment:
   HTTP_ONLY: 'OFF'
   TFLAGS: 'skiprun'
   EXAMPLES: 'OFF'
+  CMAKE_OPTIONS: ''
 
   matrix:
 
@@ -53,7 +54,7 @@ environment:
       PRJ_CFG: Release
       OPENSSL: 'ON'
       SHARED: 'ON'
-    - job_name: 'CM VS2022, Release, arm64, Schannel, Static, no-DEBUGBUILD, Build-tests'
+    - job_name: 'CM VS2022, Release, arm64, Schannel, Static, !DEBUGBUILD, Build-tests'
       APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
       PRJ_GEN: 'Visual Studio 17 2022'
       TARGET: '-A ARM64'
@@ -101,7 +102,7 @@ environment:
       SCHANNEL: 'ON'
       SHARED: 'ON'
       TFLAGS: 'skipall'
-    - job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, Build-tests'
+    - job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests'
       APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
       PRJ_GEN: 'Visual Studio 16 2019'
       TARGET: '-A x64'
@@ -109,6 +110,7 @@ environment:
       OPENSSL: 'ON'
       SCHANNEL: 'ON'
       SHARED: 'ON'
+      CMAKE_OPTIONS: '-DCURL_DISABLE_VERBOSE_STRINGS=ON'
     - job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
       APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
       PRJ_GEN: 'Visual Studio 17 2022'
@@ -119,7 +121,7 @@ environment:
       ENABLE_UNICODE: 'ON'
       EXAMPLES: 'ON'
       TOOLSET: 'ClangCl'
-    - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, no-DEBUGBUILD, Build-tests'
+    - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, !DEBUGBUILD, Build-tests'
       APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
       PRJ_GEN: 'Visual Studio 17 2022'
       TARGET: '-A x64'
index f5c8353a9f78f1ec1a2499685181dcd0d116f3a7..cabafa3383b838495f86eda7d011c68debfb8f5b 100644 (file)
@@ -614,7 +614,7 @@ static int mqtt_decode_len(size_t *lenp, unsigned char *buf, size_t buflen)
   return 0;
 }
 
-#ifdef DEBUGBUILD
+#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
 static const char *statenames[] = {
   "MQTT_FIRST",
   "MQTT_REMAINING_LENGTH",
index 84956e182dbfa7839ff7e24c7ca9cc0f2f88a086..b847f81a7a3a39ce2b6697b57bb601c845515430 100644 (file)
@@ -160,6 +160,7 @@ static void mstate(struct Curl_easy *data, CURLMstate state
     return;
 
 #ifdef DEBUGBUILD
+  NOVERBOSE((void)lineno);
   CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
 #else
   CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
index 027d28e0454a179ecba4e77e7462b7a00b2bb018..fd268c92a376607547592c0f33591356ca832301 100644 (file)
@@ -2259,7 +2259,7 @@ static CURLcode schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
       goto cleanup;
     }
     else {
-      VERBOSE(char buffer[STRERROR_LEN]);
+      char buffer[STRERROR_LEN];
       failf(data, "schannel: failed to read data from server: %s",
             Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
       result = CURLE_RECV_ERROR;