Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some clean-ups #305

Merged
merged 6 commits into from
Oct 26, 2024
Merged

Some clean-ups #305

merged 6 commits into from
Oct 26, 2024

Conversation

matttbe
Copy link
Member

@matttbe matttbe commented Oct 8, 2024

Here are a bunch of different clean-ups I did while working on #304, mostly helped by clangd.

These trailing whitespaces are useless characters. Many text editors
remove them automatically, and Git also complains about them.

Best to remove them to avoid unwanted changes, and warnings.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
When checking header files individually, some of them didn't include
stdbool.h ('bool' type) or stdint.h (uint32_t type).

Add the missing headers to have all these header files self-contained:
they can be compiled alone with analytic tools.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
'clangd' reported a few unused headers. Best to remove them then.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
clangd reported this issue:

  A function declaration without a prototype is deprecated in all versions of C.

We can simply adding 'void', we don't need any arguments there.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@matttbe matttbe requested a review from ossama-othman October 8, 2024 18:09
@coveralls
Copy link

coveralls commented Oct 8, 2024

Pull Request Test Coverage Report for Build 11531089066

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.799%

Totals Coverage Status
Change from base Build 11503089273: 0.0%
Covered Lines: 1399
Relevant Lines: 2159

💛 - Coveralls

It is useful to be used with clangd to enhance a text editor.

This file can be generated with bear, e.g.

  $ make clean
  $ bear --append -- make -j$(nproc) all check

While at it, also ignore .plist files: some CLang diagnostics files.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Similar to what is done in the Linux kernel: very likely, hidden files
and directories don't need to be tracked in git. There are exceptions
of course, like the '.github' directory, but we can always force their
inclusions with 'git add -f'.

This will at least ignore the '.cache' directory created by clangd.
Editors tend to create hidden directories and files too, so that would
cover that too.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@matttbe matttbe merged commit 5d9f33a into multipath-tcp:main Oct 26, 2024
6 checks passed
@matttbe matttbe deleted the cleanup branch October 26, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants