mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:03:31 +03:00
multi: silence gcc 16 -Wnull-dereference, bump CI job to test
- GHA/windows: bump dl-mingw job from gcc 15 to 16.
- multi: silence warning while building libcurlu:
```
In function 'multi_ischanged',
inlined from 'multi_socket.isra' at D:/a/curl/curl/lib/multi.c:3282:6:
D:/a/curl/curl/lib/multi.c:1710:17: error: null pointer dereference [-Werror=null-dereference]
1710 | bool retval = (bool)multi->recheckstate;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/curl/curl/lib/multi.c:1712:25: error: null pointer dereference [-Werror=null-dereference]
1712 | multi->recheckstate = FALSE;
| ^
```
Ref: https://github.com/curl/curl/actions/runs/26217071531/job/77142119137?pr=21707
- multi: silence another `-Wnull-dereference`, popping up in libcurl
with gcc 13 after the previous silencing:
```
In function 'Curl_multi_xfers_running',
inlined from 'multi_socket.isra' at ../../lib/multi.c:3292:28:
../../lib/multi.c:4132:15: error: null pointer dereference [-Werror=null-dereference]
4132 | return multi->xfers_alive;
| ~~~~~^~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/26218822231/job/77148186045
- multi: also add `DEBUGASSERT(multi)` to the two updated functions.
Closes #21707
This commit is contained in:
parent
64c51ad178
commit
a076f821e1
2 changed files with 14 additions and 7 deletions
13
lib/multi.c
13
lib/multi.c
|
|
@ -1707,9 +1707,13 @@ CURLMcode curl_multi_wakeup(CURLM *m)
|
|||
*/
|
||||
static bool multi_ischanged(struct Curl_multi *multi, bool clear)
|
||||
{
|
||||
bool retval = (bool)multi->recheckstate;
|
||||
if(clear)
|
||||
multi->recheckstate = FALSE;
|
||||
bool retval = FALSE;
|
||||
DEBUGASSERT(multi);
|
||||
if(multi) {
|
||||
retval = (bool)multi->recheckstate;
|
||||
if(clear)
|
||||
multi->recheckstate = FALSE;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
@ -4126,6 +4130,9 @@ struct Curl_easy *Curl_multi_get_easy(struct Curl_multi *multi,
|
|||
|
||||
unsigned int Curl_multi_xfers_running(struct Curl_multi *multi)
|
||||
{
|
||||
DEBUGASSERT(multi);
|
||||
if(!multi)
|
||||
return 0;
|
||||
return multi->xfers_alive;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue