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 compilation warning #25687

Merged
merged 1 commit into from Jan 18, 2019
Merged

Fix compilation warning #25687

merged 1 commit into from Jan 18, 2019

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jan 17, 2019

Fix clang warning: integer conversion resulted in a change of sign.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

public:
using TrajParams = std::vector<LocalTrajectoryParameters>;
using Chi2sFive = std::vector<unsigned char>;

/// default constructor
TrackExtraBase() : m_firstHit(-1), m_nHits(0) { }
TrackExtraBase() : m_firstHit((unsigned int) -1), m_nHits(0) { }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it be better to initialise this to 0 instead ?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is evident that m_firstHit is never used at its initialization value: therefore either "0" or the number corresponding to the maximum size result in the same final behavior. Maybe, having 0 hits and the first one located in the maximum possible unsigned int number as initialization values can make sense, even though I agree with you that initializing an unsigned type to "-1" can look odd.
However, your proposed fix silences clang without modifying anything in what was originally there: I would stick on it.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jan 17, 2019

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25687/8054

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 17, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32667/console Started: 2019/01/17 11:31

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

DataFormats/TrackReco

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @gpetruc, @rovere, @VinInn 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

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

Fix clang warning: integer conversion resulted in a change of sign.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jan 17, 2019

Note that the widespread whitespace changes are due to fixing the line endings from OSX to Unix.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jan 17, 2019

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25687/8056

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 17, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32668/console Started: 2019/01/17 12:56

@cmsbuild
Copy link
Contributor

Pull request #25687 was updated. @perrotta, @cmsbuild, @slava77 can you please check and sign again.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@perrotta
Copy link
Contributor

+1

  • technical
  • jenkins tests pass

@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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 372126b into cms-sw:master Jan 18, 2019
@fwyzard fwyzard deleted the patch-1 branch January 26, 2019 07:44
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