Skip to content

lib: silence gcc-16 compiler warnings -Wmaybe-uninitialized - #22651

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:gcc16
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:gcc16

Conversation

@vszakats

@vszakats vszakats commented Aug 24, 2026

Copy link
Copy Markdown
Member

Seen in the 'curl-for-win / Windows gcc zlib-classic (x64)' CI job,
after it got an upstream upgrade from gcc-15 to gcc-16:

lib/http.c:206:6: error: 'out.str' may be used uninitialized [-Werror=maybe-uninitialized]
  206 |   if(header_has_value(&header, &out)) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/api.h:188:3: error: 'guard.data' may be used uninitialized [-Werror=maybe-uninitialized]
  188 |   Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/multi.c:1695:6: note: in expansion of macro 'CURL_MAPI_ENTER'
 1695 |   if(CURL_MAPI_ENTER(&guard, m, multi_poll, &mresult)) {
      |      ^~~~~~~~~~~~~~~

Ref: https://github.com/curl/curl/actions/runs/32626356576/job/97162205296#step:3:4906

@vszakats
vszakats marked this pull request as draft August 24, 2026 07:30
@vszakats vszakats changed the title lib: try silencing gcc-16 compiler warnings lib: silence gcc-16 compiler warnings Aug 24, 2026
@vszakats vszakats changed the title lib: silence gcc-16 compiler warnings lib: silence gcc-16 compiler warnings -Wmaybe-uninitialized Aug 24, 2026
@vszakats
vszakats marked this pull request as ready for review August 24, 2026 07:35
@vszakats vszakats added the build label Aug 24, 2026
@vszakats vszakats closed this in a1bca29 Aug 24, 2026
@vszakats
vszakats deleted the gcc16 branch August 24, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant