configure: silence compiler warnings in feature checks, drop duplicates#16377
Closed
vszakats wants to merge 34 commits intocurl:masterfrom
Closed
configure: silence compiler warnings in feature checks, drop duplicates#16377vszakats wants to merge 34 commits intocurl:masterfrom
vszakats wants to merge 34 commits intocurl:masterfrom
Conversation
AmigaOS, AM gcc AmiSSL m68k.txt
```
conftest.c:153:17: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
if(0 != gethostname(s, 0))
^~~~~~~~~~~
configure:...: $? = 0
```
This reverts commit 147e9a3.
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Feb 21, 2025
Seen in Android 21/35 CI jobs:
```
/home/runner/work/curl/curl/CMake/CurlTests.c:315:16: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
315 | fsetxattr(0, 0, 0, 0, 0);
| ^
1 warning generated.
```
Ref: https://github.com/curl/curl/actions/runs/13460225795/job/37613494183#step:9:5978
Follow-up to bd9f9b0 curl#16377
vszakats
added a commit
that referenced
this pull request
Feb 21, 2025
Seen in Android 21/35 CI jobs:
```
curl/CMake/CurlTests.c:315:16: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
315 | fsetxattr(0, 0, 0, 0, 0);
| ^
1 warning generated.
```
Ref: https://github.com/curl/curl/actions/runs/13460225795/job/37613494183#step:9:5978
Follow-up to bd9f9b0 #16377
Closes #16427
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Apr 2, 2025
Partial revert of, regression from bd9f9b0 curl#16377 Reported-by: Dagobert Michelsen Fixes: curl#16915 --- FIXME: This will likely break CloseSocket detection for AmigaOS
1 task
vszakats
added a commit
that referenced
this pull request
Apr 2, 2025
The omitted link checks were not what I though they were. Omitting one caused a mis-detection on Solaris, where the compile check alone mis-detects `CloseSocket` as present. Restore link checks for these functions: `closesocket`, `ioctlsocket`, `socket`, `freeaddrinfo`, `getaddrinfo`, `gethostname`, `getpeername`, `getsockname`, `CloseSocket` (AmigaOS), `IoctlSocket` (AmigaOS). Also re-sync link check code snippets with the ones in current master. Partial revert of, regression from bd9f9b0 #16377 Reported-by: Dagobert Michelsen Bug: https://curl.se/mail/lib-2025-04/0004.html Fixes #16915 Closes #16917
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Silence compiler warnings (200 of them across the main CI workflows): ``` warning curl#2193: null argument provided for parameter marked with attribute "nonnull" warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker] warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker] warning: argument 1 null where non-null expected [-Wnonnull] warning: argument 2 null where non-null expected [-Wnonnull] warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits] warning: null argument where non-null required (argument 1) [-Wnonnull] ``` Also drop `if ... can be linked` feature checks that were identical to `if ... is compilable` checks, for: `closesocket`, `ioctlsocket`, `socket`, `freeaddrinfo`, `getaddrinfo`, `gethostname`, `getpeername`, `getsockname`, `CloseSocket` (AmigaOS), `IoctlSocket` (AmigaOS). Another option is to really do the link checks. But, if they weren't missed so far, it seems safer to drop than risk a detection failure, as was the case with AmigaOS functions while working on this PR. There remain 22 `-Wnonnull` warnings in `gethostbyname_r()`, `getpeername()` `getsockname()`. Most of the rest is necessary for detection, or originate from autotools and CMake detection code templates. Some still fixable, like duplicate libs. Follow-up to ca2f49d curl#16287 Closes curl#16377
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Seen in Android 21/35 CI jobs:
```
curl/CMake/CurlTests.c:315:16: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
315 | fsetxattr(0, 0, 0, 0, 0);
| ^
1 warning generated.
```
Ref: https://github.com/curl/curl/actions/runs/13460225795/job/37613494183#step:9:5978
Follow-up to bd9f9b0 curl#16377
Closes curl#16427
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.
Silence compiler warnings (200 of them across the main CI workflows):
Also drop
if ... can be linkedfeature checks that were identical toif ... is compilablechecks, for:closesocket,ioctlsocket,socket,freeaddrinfo,getaddrinfo,gethostname,getpeername,getsockname,CloseSocket(AmigaOS),IoctlSocket(AmigaOS).Another option is to really do the link checks. But, if they weren't
missed so far, it seems safer to drop than risk a detection failure,
as was the case with AmigaOS functions while working on this PR.
There remain 22
-Wnonnullwarnings ingethostbyname_r(),getpeername()getsockname(). Most of the rest is necessary fordetection, or originate from autotools and CMake detection code
templates. Some still fixable, like duplicate libs.
Follow-up to ca2f49d #16287
w/o ws https://github.com/curl/curl/pull/16377/files?w=1
This may be of interest, also in
tests/server/util.cwhere the deprecatedsiginterruptserves as a fallbacksince 3fb6e5a: