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

fix: treat warnings as errors and fix them #239

Merged
merged 4 commits into from
Jun 28, 2024
Merged

fix: treat warnings as errors and fix them #239

merged 4 commits into from
Jun 28, 2024

Conversation

c-dilks
Copy link
Member

@c-dilks c-dilks commented Jun 27, 2024

To prevent warnings (which can be real issues) from slipping through the cracks, build with -werror, so CI jobs fail if there are warnings. This is not the default build option, so that developers can still make test builds if there are warnings.

Fixed the following warnings:

  • unused lambda captures in PhotonGBTFilter
  • sprintf deprecation

c-dilks added 2 commits June 25, 2024 21:05
To prevent warnings (which can be real issues) from slipping through the
cracks, build with `-werror`, so CI jobs fail if there are warnings.
This is not the default build option, so that developers can still make
test builds if there are warnings.
Fixes warnings
```
In file included from ../iguana_src/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc:1:
../iguana_src/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h:130:32: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
  130 |             {{5032, 5332, 1}, [this](std::vector<float> const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Fall2018 RGA Inbending
      |                                ^~~~
```
(for some reason, they only appear with certain sanitizers...)
@c-dilks c-dilks requested a review from Gregtom3 as a code owner June 27, 2024 19:16
@c-dilks c-dilks changed the title fix: unused lambda captures in PhotonGBTFilter fix: treat warnings as errors and fix them Jun 27, 2024
@c-dilks c-dilks changed the base branch from werror to main June 27, 2024 19:36
@c-dilks c-dilks marked this pull request as draft June 27, 2024 19:37
@c-dilks c-dilks marked this pull request as ready for review June 28, 2024 19:24
@c-dilks c-dilks merged commit ce77534 into main Jun 28, 2024
44 checks passed
@c-dilks c-dilks deleted the fix-warnings branch June 28, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant