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/Forward: Fix clang warnings -Woverloaded-virtual -Wself-assign #22789

Closed
wants to merge 1 commit into from
Closed

SimG4CMS/Forward: Fix clang warnings -Woverloaded-virtual -Wself-assign #22789

wants to merge 1 commit into from

Conversation

gartung
Copy link
Member

@gartung gartung commented Mar 28, 2018

Changed the parameters of getEnergyDeposit to match base class by making second parameter a class member.
Remove self assign statement.

SimG4CMS/Forward/interface/ZdcSD.h:23:10: warning: 'ZdcSD::getEnergyDeposit' hides overloaded virtual function [-Woverloaded-virtual]
double getEnergyDeposit(const G4Step*, edm::ParameterSet const &);
^
/SimG4CMS/Calo/interface/CaloSD.h:60:18: note: hidden overloaded virtual function 'CaloSD::getEnergyDeposit' declared here: different number of parameters (1 vs 2)
virtual double getEnergyDeposit(G4Step* step);
^

SimG4CMS/Forward/src/CastorSD.cc:691:8: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
scale=scale; // if electromagnetic, don't do anything
~~~~~^~~~~~

Changed the parameters of getEnergyDeposit to match base class by making second parameter a class member.
Remove self assign statement.

SimG4CMS/Forward/interface/ZdcSD.h:23:10: warning: 'ZdcSD::getEnergyDeposit' hides overloaded virtual function [-Woverloaded-virtual]
   double getEnergyDeposit(const G4Step*, edm::ParameterSet const &);
         ^
/SimG4CMS/Calo/interface/CaloSD.h:60:18: note: hidden overloaded virtual function 'CaloSD::getEnergyDeposit' declared here: different number of parameters (1 vs 2)
  virtual double getEnergyDeposit(G4Step* step);
                 ^

SimG4CMS/Forward/src/CastorSD.cc:691:8: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
                 scale=scale; // if electromagnetic, don't do anything
                ~~~~~^~~~~~
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

SimG4CMS/Forward

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

cms-bot commands are listed here

@smuzaffar smuzaffar modified the milestones: CMSSW_10_1_X, CMSSW_10_2_X Mar 29, 2018
@civanch
Copy link
Contributor

civanch commented Mar 29, 2018

@gartung , let us wait for #22145 to be merged. CastorSD problem is fixed there, ZdsSD fix may follow after.

@civanch
Copy link
Contributor

civanch commented Mar 29, 2018

-1

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