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

Silence Clang static analyzer warnings #582

Merged
merged 10 commits into from
Sep 13, 2023
Merged

Conversation

giacomofiorin
Copy link
Member

Fixes #581

@giacomofiorin giacomofiorin added the maintenance No user-visible effects label Sep 11, 2023
@giacomofiorin
Copy link
Member Author

@HubLot I fixed a couple where the purpose of the code may not be immediately evident. Can you get the Clang command used so that we can add it to the CI for this PR?

Easiest may be to add packages from Ubuntu (GH Actions) but we can also use the CentOS container.

@HubLot HubLot force-pushed the silence-clang-warnings branch 2 times, most recently from 42dba19 to 1c18700 Compare September 12, 2023 09:40
@HubLot HubLot force-pushed the silence-clang-warnings branch from 922acdc to f864906 Compare September 13, 2023 08:25
@HubLot
Copy link
Member

HubLot commented Sep 13, 2023

I added a new CI job for the Clang analyzer.
It took me some trials & errors but it works. I silent the warnings from lepton to avoid having it failing all the time. A log artifact can be also uploaded with the warnings only if they exists.

I fix some others warnings but it needs reviewing. Specially the one with the error_code not read. I found different ways of exiting a function inside the code so I tried to mimic one of them to fix the warnings.

@HubLot HubLot marked this pull request as ready for review September 13, 2023 08:35
@giacomofiorin
Copy link
Member Author

Thanks! I'll look at this and merge if appropriate.

Sorry we don't have a uniform way to handle exit codes, we started adding them with the VMD integration (beginning ~2014 or so) but much of the code predates even that time.

@giacomofiorin giacomofiorin merged commit cf8fa11 into master Sep 13, 2023
31 checks passed
@giacomofiorin giacomofiorin deleted the silence-clang-warnings branch September 13, 2023 23:35
@giacomofiorin giacomofiorin mentioned this pull request Aug 5, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance No user-visible effects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning from Clang static analyser
2 participants