Skip to content

hostip: fix unreachable code in rare build configuration#20344

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:unused
Closed

hostip: fix unreachable code in rare build configuration#20344
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:unused

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jan 18, 2026

with cmake options:

-DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_HTTP=ON -DENABLE_THREADED_RESOLVER=OFF

Fixing (seen with Apple clang 17):

lib/hostip.c:939:16: error: code will never be executed [-Werror,-Wunreachable-code]
  940 |       *entry = dns;
      |                ^~~

cmake options:
```
-DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_HTTP=ON -DENABLE_THREADED_RESOLVER=OFF
```

Fixing:
```
lib/hostip.c:939:16: error: code will never be executed [-Werror,-Wunreachable-code]
  940 |       *entry = dns;
      |                ^~~
```
@github-actions github-actions bot added the name lookup DNS and related tech label Jan 18, 2026
@vszakats vszakats added build and removed name lookup DNS and related tech labels Jan 18, 2026
@testclutch

This comment has been minimized.

@vszakats vszakats closed this in aef128e Jan 18, 2026
@vszakats vszakats deleted the unused branch January 18, 2026 11:46
vszakats added a commit to curl/curl-for-win that referenced this pull request Jan 18, 2026
vszakats added a commit to curl/curl-for-win that referenced this pull request Jan 18, 2026
The upstream patch is no longer important, after disabling unity for
macOS trurl builds again.

Refs:
curl/curl@aef128e
curl/curl#20344

Follow-up to d4abe8f859974af1ea3918b73f538deb8f6587c2
Follow-up to 922e754
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants