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

Part 2 of static analysis code improvements #1453

Merged
merged 14 commits into from
Sep 13, 2024
Merged

Conversation

tvami
Copy link
Member

@tvami tvami commented Sep 10, 2024

I am updating ldmx-sw, here are the details.

What are the issues that this addresses?

Part 2 of #1176

Check List

  • I successfully compiled ldmx-sw with my developments
  • I ran my developments and the following shows that they are successful.

Running

just configure -DADDITIONAL_WARNINGS=ON -DENABLE_LTO=ON  -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
just build 

the warnings/errors are gone after this PR.

Copy link
Member Author

@tvami tvami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are plenty variables that are in the code and are not used (thus the compiler will complain). The approach I took was to comment them out for now and put a flag FIXME and bring them to subsystem experts to see if they are ok to get removed, so I'm tagging Tom, Einar, Lene Kristian and Matt directly at point where I'd need confirmation. I think many of them are there for future developement, in those cases, we can keep them commented until they are needed.

Conditions/src/Conditions/SimpleTableStreamers.cxx Outdated Show resolved Hide resolved
Biasing/include/Biasing/TargetProcessFilter.h Outdated Show resolved Hide resolved
DQM/src/DQM/HcalInefficiencyDQM.cxx Outdated Show resolved Hide resolved
Ecal/include/Ecal/EcalDigiProducer.h Outdated Show resolved Hide resolved
Ecal/include/Ecal/MyClusterWeight.h Outdated Show resolved Hide resolved
Tracking/src/Tracking/Reco/Vertexer.cxx Show resolved Hide resolved
Tracking/src/Tracking/Reco/Vertexer.cxx Show resolved Hide resolved
TrigScint/src/TrigScint/QIEDecoder.cxx Show resolved Hide resolved
TrigScint/src/TrigScint/SimQIE.cxx Show resolved Hide resolved
@tvami
Copy link
Member Author

tvami commented Sep 11, 2024

Also no changes observed in the CI tests:
https://github.com/LDMX-Software/ldmx-sw/actions/runs/10801316844

@tvami tvami added cleanup memory leak fix Tags issues and PRs that fix memory leaks. labels Sep 11, 2024
DQM/src/DQM/HcalInefficiencyDQM.cxx Outdated Show resolved Hide resolved
Hcal/test/HcalDigiPipelineTest.cxx Show resolved Hide resolved
Hcal/test/HcalGeometryTest.cxx Outdated Show resolved Hide resolved
Hcal/test/HcalGeometryTest.cxx Outdated Show resolved Hide resolved
@tvami tvami force-pushed the iss1176-part2-static-analysis branch from 23aaf3e to 00e9b49 Compare September 11, 2024 18:09
@bloodyyugo
Copy link
Contributor

I went through all the issues assign to me ... most are ok to delete, but I want to keep some. It wouldn't let me commit in-line.

@tvami
Copy link
Member Author

tvami commented Sep 13, 2024

I went through all the issues assign to me ... most are ok to delete, but I want to keep some. It wouldn't let me commit in-line.

Thanks Matt, I'll do one commit to address them all!

@tvami
Copy link
Member Author

tvami commented Sep 13, 2024

@bloodyyugo I pushed it now, please approve if it looks good

Copy link
Contributor

@bloodyyugo bloodyyugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go.

@tvami
Copy link
Member Author

tvami commented Sep 13, 2024

I'm going to merge this now, and address the TS related (only 4 files, the rest are all good) questions in a new PR.
@bryngemark please do comment on this PR if I can delete those lines of code that I asked you about, if yes, I'll delete them in my next (and hopefully last) PR

@tvami tvami merged commit a546306 into trunk Sep 13, 2024
2 checks passed
@tvami tvami deleted the iss1176-part2-static-analysis branch September 13, 2024 23:31
@bryngemark
Copy link
Contributor

sorry to be late to the party! but maybe only one deletion to make @tvami :)

@tvami
Copy link
Member Author

tvami commented Sep 17, 2024

No worries, still in time for part 3 so we are good! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup memory leak fix Tags issues and PRs that fix memory leaks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants