clang-tidy: fix issues found with build-fuzzing - #20774
Closed
vszakats wants to merge 6 commits into
Closed
Conversation
/lib/vtls/vtls.c:141:31: error: unused variable 'ALPN_SPEC_H2' [clang-diagnostic-unused-const-variable]
141 | static const struct alpn_spec ALPN_SPEC_H2 = {
| ^~~~~~~~~~~~
lib/vtls/vtls.c:144:31: error: unused variable 'ALPN_SPEC_H2_H11' [clang-diagnostic-unused-const-variable]
144 | static const struct alpn_spec ALPN_SPEC_H2_H11 = {
| ^~~~~~~~~~~~~~~~
lib/vtls/vtls.c:147:31: error: unused variable 'ALPN_SPEC_H11_H2' [clang-diagnostic-unused-const-variable]
147 | static const struct alpn_spec ALPN_SPEC_H11_H2 = {
| ^~~~~~~~~~~~~~~~
lib/doh.c:204:3: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow,-warnings-as-errors]
204 | return;
| ^~~~~~~
205 | }
lib/doh.c:1194:3: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow,-warnings-as-errors]
1194 | return;
| ^~~~~~~
1195 | }
Follow-up to 57ff2d6 curl#20106 Error while processing tests/unit/unit3216.c. tests/unit/unit1607.c:150:40: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 150 | if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen, | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit1607.c:150:55: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 150 | if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen, | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit1607.c:210:18: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 210 | addr = addr->ai_next; | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit1609.c:149:40: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 149 | if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen, | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit1609.c:149:55: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 149 | if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen, | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit1609.c:192:18: error: incomplete definition of type 'struct Curl_addrinfo' [clang-diagnostic-error] 192 | addr = addr->ai_next; | ~~~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^ tests/unit/unit2600.c:197:22: error: incomplete definition of type 'const struct Curl_addrinfo' [clang-diagnostic-error] 197 | ctx->ai_family = ai->ai_family; | ~~^ lib/hostip.h:57:10: note: forward declaration of 'struct Curl_addrinfo' 57 | struct Curl_addrinfo *addr; | ^
vszakats
force-pushed
the
ctidystress
branch
from
February 28, 2026 23:01
803108e to
f87e744
Compare
1 task
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Mar 2, 2026
```
lib/multi.c:305:5: error: code will never be executed [clang-diagnostic-unreachable-code]
305 | goto error;
| ^~~~~~~~~~
```
Cherry-picked from curl#20774
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
- curl_sha512_256: add missing, drop redundant, parentheses. - doh: drop redundant returns. - url: add missing parentheses. - vtls: fix unused const variables. - tests/unit: fix missing header with clang-tidy and !threaded-resolver. Follow-up to 57ff2d6 curl#20106 Closes curl#20774
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
```
lib/multi.c:305:5: error: code will never be executed [clang-diagnostic-unreachable-code]
305 | goto error;
| ^~~~~~~~~~
```
Cherry-picked from curl#20774
Closes curl#20788
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.
Follow-up to 57ff2d6 dns: flatten the include tree #20106
into a future PR to avoid a rebase conflict with the stacked PRs.
(update is close to changed lines)