]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
unit1660: fix unreachable code warning in no-SSL builds
authorViktor Szakats <commit@vsz.me>
Wed, 4 Sep 2024 01:25:09 +0000 (03:25 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 19 Sep 2024 21:06:09 +0000 (23:06 +0200)
Or no-HTTP, no-HSTS builds, also MSH3 builds.

CMake, VS2022, Debug, x64, no SSL, Static, Build-only:
```
C:\projects\curl\tests\unit\unit1660.c(46,1): error C2220: the following warning is treated as an error
C:\projects\curl\tests\unit\unit1660.c(46,1): warning C4702: unreachable code
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50531210/job/cjewvo9agavthr3o#L216

Required-by: #14922
Cherry-picked from #14772
Closes #14971

tests/unit/unit1660.c

index e14944592c2fbc5e5962c3fbad454053103c7b37..46ab93ed8f87493d4671fc0b422e173949591f72 100644 (file)
@@ -41,7 +41,7 @@ unit_stop(void)
 #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS)
 UNITTEST_START
 {
-  return CURLE_OK; /* nothing to do when HTTP or HSTS are disabled */
+  puts("nothing to do when HTTP or HSTS are disabled");
 }
 UNITTEST_STOP
 #else