-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 gcc 9 warnings in DataFormats #27844
Conversation
please test |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27844/11581
|
The tests are being triggered in jenkins. |
A new Pull Request was created by @mrodozov (Mircho Rodozov) for master. It involves the following packages: DataFormats/EgammaCandidates @perrotta, @slava77, @christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@@ -35,7 +35,7 @@ double HFRecalibration::getCorr(int ieta, int depth, double lumi) { | |||
switch (depth) { | |||
case 1: | |||
reCalFactor = (1 + HFParsAB[0][0][ieta] * sqrt(lumi) + HFParsAB[0][1][ieta] * lumi); | |||
|
|||
[[fallthrough]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this wasn't originally supposed to fall through: @abdoulline @igv4321 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@perrotta
I suppose there had to be "break" originally (apparently forgotten by author), as HF depths are treated separately (method parameter list has "depth" parameter).
So fall though doesn't seem to be natural here...
@@ -396,6 +396,7 @@ SiStripModuleGeometry TrackerTopology::moduleGeometry(const DetId &id) const { | |||
case 3: | |||
return SiStripModuleGeometry::W3A; | |||
} | |||
[[fallthrough]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should never fall through in real life, though, I would rather break here, after returning an SiStripModuleGeometry::UNKNOWNGEOMETRY;
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@@ -90,6 +90,7 @@ void Photon::setCorrectedEnergy(P4type type, float newEnergy, float delta_e, boo | |||
case regression1: | |||
eCorrections_.regression1Energy = newEnergy; | |||
eCorrections_.regression1EnergyError = delta_e; | |||
[[fallthrough]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it rather break here? @Sam-Harper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is bug, thanks for pointing this out. Luckily I dont think we use regression1 and its regression2 that is our main correction. Likewise for comment below
@@ -150,6 +151,7 @@ void Photon::setP4(P4type type, const LorentzVector& p4, float error, bool setTo | |||
case regression1: | |||
eCorrections_.regression1P4 = p4; | |||
eCorrections_.regression1EnergyError = error; | |||
[[fallthrough]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it rather break here? @Sam-Harper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, see above comment, thanks for spotting!
Once could profit and further remove unneeded |
@mrodozov , all updates have been addressed separately, and it looks like that the correct fix is here in all cases to replace the fallthrough with an apparently forgotten |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27844/11741
|
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Fixes warnings in DataFormats gcc9 IB
PR validation:
Builds without warnings. Some warnings were from other packages (PR still open)