Skip to content

cf-https-connect: silence -Wimplicit-int-enum-cast with HTTPS-RR + clang 21#21057

Closed
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:alpnsenum
Closed

cf-https-connect: silence -Wimplicit-int-enum-cast with HTTPS-RR + clang 21#21057
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:alpnsenum

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Mar 21, 2026

Fixing (seen in curl-for-win dev branch):

In file included from _a64-linux-gnu-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:34:
lib/cf-https-connect.c:681:28: error: implicit conversion from 'unsigned char' to enumeration type 'enum alpnid' is invalid in C++ [-Werror,-Wimplicit-int-enum-cast]
  681 |         enum alpnid alpn = rr->alpns[i];
      |                     ~~~~   ^~~~~~~~~~~~e

Ref: #21032


Confirmed working: https://github.com/curl/curl-for-win/actions/runs/23389993294

Fixing (seen in HTTPS-RR builds with clang 21+ in curl-for-win dev):
```
In file included from _a64-linux-gnu-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:34:
lib/cf-https-connect.c:681:28: error: implicit conversion from 'unsigned char' to enumeration type 'enum alpnid' is invalid in C++ [-Werror,-Wimplicit-int-enum-cast]
  681 |         enum alpnid alpn = rr->alpns[i];
      |                     ~~~~   ^~~~~~~~~~~~
```

Follow-up to 59405ff curl#20990
Follow-up to 0d4fdbf curl#16054

Cherry-picked from curl#21032
@github-actions github-actions bot added the HTTP label Mar 21, 2026
@vszakats vszakats changed the title cf-https-connect: silence -Wimplicit-int-enum-cast with HTTPS-RR + clang 21+ cf-https-connect: silence -Wimplicit-int-enum-cast with HTTPS-RR + clang 21 Mar 21, 2026
@vszakats vszakats closed this in e09a7b8 Mar 21, 2026
@vszakats vszakats deleted the alpnsenum branch March 21, 2026 22:47
vszakats added a commit to vszakats/curl that referenced this pull request Mar 31, 2026
vszakats added a commit to vszakats/curl that referenced this pull request Mar 31, 2026
vszakats added a commit that referenced this pull request Mar 31, 2026
…clang 21 (reapply)

Reapply: e09a7b8 #21057

Also:
- enable HTTPS-RR by default in curl-for-win to test it with clang 21.
  Ref: curl/curl-for-win@dc65c44

Follow-up to 335dc0e #21027

Closes #21167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant