Skip to content

lib: tidy up types and casts#13862

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:lib-type-tidy
Closed

lib: tidy up types and casts#13862
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:lib-type-tidy

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jun 2, 2024

Cherry-picked from #13489
Closes #13862

Cherry-picked from curl#13489
Closes #xxxxx
@vszakats vszakats closed this in 72abf7c Jun 5, 2024
@vszakats vszakats deleted the lib-type-tidy branch June 5, 2024 12:03
vszakats added a commit that referenced this pull request Mar 24, 2025
- cmake: disable test bundles for clang-tidy builds.
  clang-tidy ignores #included .c sources, and incompatible with unity
  and bundles. It caused clang-tidy ignoring all test sources. It also
  means this is the first time tests sources are checked with
  clang-tidy. (autotools doesn't run it on tests.)

- cmake: update description for `CURL_TEST_BUNDLES` option.

- fix tests using special `CURLE_*` enums that were missing from
  `curl/curl.h`. Add them as reserved codes.

- fix about ~50 other issues detected by clang-tidy: unchecked results,
  NULL derefs, memory leaks, casts to enums, unused assigments,
  uninitialized `errno` uses, unchecked `open`, indent, and more.

- drop unnecessary casts (lib1533, lib3207).

- suppress a few impossible cases with detailed `NOLINT`s.

- lib/escape.c: drop `NOLINT` no longer necessary.
  Follow-up to 72abf7c #13862 (possibly)

- extend two existing `NOLINT` comments with details.

Follow-up to fabfa8e #15825

Closes #16756
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
- cmake: disable test bundles for clang-tidy builds.
  clang-tidy ignores #included .c sources, and incompatible with unity
  and bundles. It caused clang-tidy ignoring all test sources. It also
  means this is the first time tests sources are checked with
  clang-tidy. (autotools doesn't run it on tests.)

- cmake: update description for `CURL_TEST_BUNDLES` option.

- fix tests using special `CURLE_*` enums that were missing from
  `curl/curl.h`. Add them as reserved codes.

- fix about ~50 other issues detected by clang-tidy: unchecked results,
  NULL derefs, memory leaks, casts to enums, unused assigments,
  uninitialized `errno` uses, unchecked `open`, indent, and more.

- drop unnecessary casts (lib1533, lib3207).

- suppress a few impossible cases with detailed `NOLINT`s.

- lib/escape.c: drop `NOLINT` no longer necessary.
  Follow-up to 72abf7c curl#13862 (possibly)

- extend two existing `NOLINT` comments with details.

Follow-up to fabfa8e curl#15825

Closes curl#16756
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