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
Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962
Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962
Conversation
…t-out-of-range-compare] warning: comparison of constant 140 with expression of type 'reco::GsfElectron::Classification' is always true [-Wtautological-constant-out-of-range-compare] zeeCandidates[myBestZ].second->getRecoElectron()->classification()!= 140); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~ Store return value on ClassificationVariables::classification() in a temporary variable and then compare to the "magic numbers". This is obviously an unused algorithm because the conversion to the classification enum values was never made. I think this algorithm was implemented elsewhere in the code. This aviods the clang warning, but if this is unused code it should be removed.
A new Pull Request was created by @gartung (Patrick Gartung) for master. It involves the following packages: Calibration/EcalCalibAlgos @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @davidlange6, @lpernie can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+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 requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
+1 |
Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare]
warning: comparison of constant 140 with expression of type 'reco::GsfElectron::Classification' is always true [-Wtautological-constant-out-of-range-compare]
zeeCandidates[myBestZ].second->getRecoElectron()->classification()!= 140);