lib/v*: silence -Wsign-conversion, tidy-ups, fixes#13472
Closed
vszakats wants to merge 22 commits intocurl:masterfrom
Closed
lib/v*: silence -Wsign-conversion, tidy-ups, fixes#13472vszakats wants to merge 22 commits intocurl:masterfrom
-Wsign-conversion, tidy-ups, fixes#13472vszakats wants to merge 22 commits intocurl:masterfrom
Conversation
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
-Wsign-conversion in vauth, vtls, openssl-Wsign-conversion, tidy-ups
-Wsign-conversion, tidy-ups-Wsign-conversion, tidy-ups, fixes
Member
Author
|
Closing in favour of #13501 and cherry-picking from there. It has the same commits as this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib/v*building without signedness warnings after this PR.Also:
ctx_option_ttype for openssl 1.1.x.CURLcode/OSStatusmix-up.Curl_gtls_verifyserver().Cherry-picked from #13489
Follow-up to 3829759 #12489
Closes #13472