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
[SimCalorimetry/EcalElectronicsEmulation] Solve warning found by gcc 5.3.0. #13571
Conversation
A new Pull Request was created by @Degano (Alessandro Degano) for CMSSW_8_1_X. It involves the following packages: SimCalorimetry/EcalElectronicsEmulation @cmsbuild, @civanch, @mdhildreth, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
please test |
The tests are being triggered in jenkins. |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
@@ -481,7 +481,7 @@ void EcalSimRawData::getSrfs(const edm::Event& event, | |||
//EE | |||
edm::Handle<EESrFlagCollection> hEeSrFlags; | |||
event.getByLabel(srDigiProducer_, eeSrFlagCollection_, hEeSrFlags); | |||
for(size_t i=0; i < sizeof(eeSrf)/sizeof(int); ((int*)eeSrf)[i++] = -1){}; | |||
for(size_t i=0; i < (nEndcaps*nScX*nScY); ((int*)eeSrf)[i++] = -1){}; |
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 multiplication operation is going to perform for every iteration ..... may be better to calculate it once outside the loop?
+1 |
[SimCalorimetry/EcalElectronicsEmulation] Solve warning found by gcc 5.3.0.
https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc6_amd64_gcc530/CMSSW_8_1_X_2016-03-02-1100/SimCalorimetry/EcalElectronicsEmulation
At compile time the class method hasn't evaluated the array parameter therefore evaluating the "sizeof" of the array parameter as the sizeof a pointer of that type.