Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/v*: silence -Wsign-conversion, tidy-ups, fixes #13472

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 25, 2024

lib/v* building without signedness warnings after this PR.

Also:

  • openssl: fix ctx_option_t type for openssl 1.1.x.
  • openssl: add three missing negative checks.
  • sectransp: fix CURLcode/OSStatus mix-up.
  • gtls: add FIXMEs to Curl_gtls_verifyserver().

Cherry-picked from #13489
Follow-up to 3829759 #12489
Closes #13472

vszakats added a commit to vszakats/curl that referenced this pull request Apr 27, 2024
vszakats added a commit to vszakats/curl that referenced this pull request Apr 29, 2024
@vszakats vszakats marked this pull request as draft April 29, 2024 15:18
Documentation says it's `long`, but really is `unsigned long`.

```
vtls/openssl.c:3695:38: error: conversion to 'long unsigned int' from 'ctx_option_t' {aka 'long int'} may change the sign of the result [-Werror=sign-conversion]
 3695 |   SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
      |                                      ^~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/8868596554/job/24348345926#step:31:490
temp:
```
C:/projects/curl/lib/vtls/x509asn1.c:961:12: error: cast from function call of type 'CURLcode' to non-matching type 'int' [-Werror=bad-function-cast]
  961 |     return (int)do_pubkey_field(data, certnum, "ecPublicKey", pubkey);
      |            ^
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49704256/job/hcietrd5e7qbu73c#L326
@github-actions github-actions bot added the tests label Apr 29, 2024
@vszakats vszakats changed the title lib: silence -Wsign-conversion in vauth, vtls, openssl lib/v*: silence -Wsign-conversion, tidy-ups Apr 29, 2024
@vszakats vszakats changed the title lib/v*: silence -Wsign-conversion, tidy-ups lib/v*: silence -Wsign-conversion, tidy-ups, fixes Apr 29, 2024
@github-actions github-actions bot added the tests label Apr 29, 2024
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.

None yet

1 participant