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
build: fix some -Wsign-conversion
/-Warith-conversion
warnings
#12492
Closed
Conversation
This file contains 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
vszakats
force-pushed
the
sign-conv
branch
2 times, most recently
from
December 13, 2023 23:38
c657225
to
f31da30
Compare
vszakats
changed the title
see
build: fix some Dec 16, 2023
-Wsign-conversion
-Wsign-conversion
warnings
vszakats
force-pushed
the
sign-conv
branch
2 times, most recently
from
December 16, 2023 15:40
6e8616e
to
eaf8ca0
Compare
vszakats
changed the title
build: fix some
build: fix some Dec 16, 2023
-Wsign-conversion
warnings-Wsign-conversion
/-Warith-conversion
warnings
E.g.:
510-520 unique warnings in each, probably with large overlap. There are a few options to proceed with this:
|
and indentation Ref: https://github.com/curl/curl/actions/runs/7148682295/job/19469980314?pr=12492#step:29:1235 ``` inet_pton.c:115:35: error: conversion to 'unsigned int' from 'int' may change the sign of the result [-Werror=arith-conversion] 115 | unsigned int val = *tp * 10 + (unsigned int)(pch - digits); | ^ ``` Ref: https://dev.azure.com/daniel0244/curl/_build/results?buildId=18964&view=logs&jobId=fd8b539a-45be-52ee-427b-3ad3fdec5ebd&j=81bb90a1-709c-5261-a92d-4869708fd1b6&t=5cd3fffe-65e4-58bd-82d3-f0b036b20e6c
vszakats
added a commit
that referenced
this pull request
Dec 20, 2023
Fix remaining warnings in examples and tests which are not suppressed by the pragma in `lib/curl_setup.h`. Silence a toolchain issue causing warnings in `FD_SET()` calls with older Cygwin/MSYS2 builds. Likely fixed on 2020-08-03 by: https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=5717262b8ecfed0f7fab63e2c09c78991e36f9dd Follow-up to 2dbe75b #12492 Closes #12557
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.
-Wsign-conversion
warnings, but also setting them to notraise errors.
-Warith-conversion
warnings seen in CI.These are triggered by
-Wsign-converion
and causing errors unlessexplicitly silenced. It makes more sense to fix them, there just a few
of them.
-Wsign-conversion
warnings.-Wsign-conversion
warnings with a#pragma
.CURL_WARN_SIGN_CONVERSION
to unhide them on a per-buildbasis.
https://github.com/curl/curl/actions/workflows/linux.yml -> OpenSSL -O3
TODO:
-Wsign-conversion
warnings. [FUTURE]CURL_WARN_SIGN_CONVERSION
logic and delete-Wno-error=sign-conversion
options. [FUTURE]