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

Fix build errors when compiled with -O0 #43030

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Conversation

smuzaffar
Copy link
Contributor

@smuzaffar smuzaffar commented Oct 16, 2023

Building cmsw with -O0 instead of O2 failed with many error like

error: control reaches end of non-void function
error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]

This PR fixes those errors.

[a] cms-sw/cmsdist#8761

Calibration/IsolatedParticles/src/FindDistCone.cc: In function 'double spr::getDistInCMatHcal(double, double, double, double, bool)':
  Calibration/IsolatedParticles/src/FindDistCone.cc:85:3: error: control reaches end of non-void function [-Werror=return-type]
    85 |   }
  DQM/HcalCommon/src/HashFunctions.cc:337:25: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
   337 |       sprintf(name, "FED%d", eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()));

 DQM/HcalCommon/src/ElectronicsQuantity.cc:435:18: note: 'sprintf' output between 4 and 24 bytes into a destination of size 10
  435 |           sprintf(name, "%d-%d", eid.dccid() + FED_VME_MIN, eid.spigot());

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43030/37205

  • This PR adds an extra 64KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43030/37206

  • This PR adds an extra 64KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • Calibration/IsolatedParticles (alca)
  • CommonTools/TrackerMap (reconstruction, dqm)
  • CondCore/RunInfoPlugins (db)
  • CondFormats/DQMObjects (dqm, db)
  • CondFormats/SiStripObjects (alca, db)
  • DQM/HcalCommon (dqm)
  • RecoVertex/BeamSpotProducer (alca, reconstruction)

@consuegs, @francescobrivio, @syuvivida, @rvenditti, @nothingface0, @antoniovagnerini, @saumyaphor4252, @perrotta, @mandrenguyen, @cmsbuild, @jfernan2, @tjavaid can you please review it and eventually sign? Thanks.
@abdoulline, @erikbutz, @VourMa, @seemasharmafnal, @threus, @rovere, @tocheng, @yuanchao, @venturia, @rsreds, @VinInn, @mtosi, @JanFSchulte, @DryRun, @bsunanda, @dgulhan, @francescobrivio, @GiacomoSguazzoni, @mmusich, @missirol, @PonIlya this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43030/37208

  • This PR adds an extra 64KB to repository

@cmsbuild
Copy link
Contributor

Pull request #43030 was updated. @cmsbuild, @nothingface0, @tjavaid, @mandrenguyen, @consuegs, @antoniovagnerini, @perrotta, @rvenditti, @syuvivida, @francescobrivio, @jfernan2, @saumyaphor4252 can you please check and sign again.

@smuzaffar smuzaffar changed the title Fix for Werror=return-type wehn compiled with -O0 Fix for Werror=return-type when compiled with -O0 Oct 17, 2023
@cmsbuild
Copy link
Contributor

Pull request #43030 was updated. @cmsbuild, @saumyaphor4252, @rvenditti, @tjavaid, @consuegs, @mandrenguyen, @jfernan2, @francescobrivio, @antoniovagnerini, @perrotta, @syuvivida, @nothingface0 can you please check and sign again.

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2a27f4/35259/summary.html
COMMIT: 688a009
CMSSW: CMSSW_13_3_X_2023-10-17-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/43030/35259/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 5 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3357400
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3357372
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 214 log files, 167 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

+1

@jfernan2
Copy link
Contributor

+1

@tjavaid
Copy link

tjavaid commented Oct 19, 2023

+1

@cmsbuild
Copy link
Contributor

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 will now be reviewed by the release team before it's merged. @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+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.

7 participants