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

Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962

Merged
merged 1 commit into from Aug 1, 2017
Merged

Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962

merged 1 commit into from Aug 1, 2017

Conversation

gartung
Copy link
Member

@gartung gartung commented Jul 28, 2017

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);


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.

…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.
@cmsbuild
Copy link
Contributor

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.
@ghellwig, @mmusich, @tocheng, @argiro this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@gartung
Copy link
Member Author

gartung commented Jul 28, 2017

@Dr15Jones

@arunhep
Copy link
Contributor

arunhep commented Jul 31, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 31, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21933/console Started: 2017/07/31 22:44

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19962/21933/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 25
  • DQMHistoTests: Total histograms compared: 2651091
  • DQMHistoTests: Total failures: 75806
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2575104
  • DQMHistoTests: Total skipped: 181
  • DQMHistoTests: Total Missing objects: 0
  • Checked 102 log files, 14 edm output root files, 25 DQM output files

@arunhep
Copy link
Contributor

arunhep commented Aug 1, 2017

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

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

@davidlange6
Copy link
Contributor

+1
(interesting code...)

@cmsbuild cmsbuild merged commit bf7c837 into cms-sw:master Aug 1, 2017
@gartung gartung deleted the Calibration-EcalCalibAlgos-fix-clang-warning branch September 27, 2017 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants