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

SimG4CMS packages: Fix clang warnings about absolute value use. #16953

Merged
merged 2 commits into from Dec 11, 2016
Merged

SimG4CMS packages: Fix clang warnings about absolute value use. #16953

merged 2 commits into from Dec 11, 2016

Conversation

gartung
Copy link
Member

@gartung gartung commented Dec 9, 2016

Replace abs/fabs with std::abs which has a signature for ints and floats.
Fixed misplaced parens which result in absolute values of a bool.
The absolute value of unsigned vars is meaningless. Cast to signed vars
to prevent difference from wrapping to unsigned var max value.

Replace abs/fabs with std::abs which has a signature for ints and floats.
Fixed misplaced parens which result in absolute values of a bool.
The absolute value of unsigned vars is meaningless. Cast to signed vars
to prevent difference from wrapping to unsigned var max value.
@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2016

A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_9_0_X.

It involves the following packages:

SimG4CMS/Calo
SimG4CMS/ShowerLibraryProducer

@cmsbuild, @civanch, @mdhildreth, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel this is something you requested to watch as well.
@slava77, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@civanch
Copy link
Contributor

civanch commented Dec 9, 2016

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/16924/console Started: 2016/12/09 22:10

@gartung gartung changed the title SimG4 packages: Fix clang warnings about absolute value use. SimG4CMS packages: Fix clang warnings about absolute value use. Dec 9, 2016
@civanch
Copy link
Contributor

civanch commented Dec 9, 2016

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2016

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2016

Comparison job queued.

@cmsbuild
Copy link
Contributor

@@ -59,7 +59,7 @@ CastorShowerLibraryMaker::CastorShowerLibraryMaker(const edm::ParameterSet &p) :
//
NPGParticle = PGParticleIDs.size();
for(unsigned int i=0;i<PGParticleIDs.size();i++) {
switch (int(fabs(PGParticleIDs.at(i)))) {
switch (int(std::abs(PGParticleIDs.at(i)))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @gartung - we can drop the int() now?

@cmsbuild
Copy link
Contributor

Pull request #16953 was updated. @cmsbuild, @civanch, @mdhildreth, @davidlange6 can you please check and sign again.

@gartung
Copy link
Member Author

gartung commented Dec 10, 2016

Done.

@civanch
Copy link
Contributor

civanch commented Dec 10, 2016

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 10, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/16948/console Started: 2016/12/10 20:38

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@civanch
Copy link
Contributor

civanch commented Dec 10, 2016

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 9ae57ef into cms-sw:CMSSW_9_0_X Dec 11, 2016
@gartung gartung deleted the SimG4CMS-fix-clang-warning-abs branch December 13, 2016 01:54
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