-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Maybe remove build warning in TrackerMap, but at least clean it up #42373
Maybe remove build warning in TrackerMap, but at least clean it up #42373
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42373/36398
|
A new Pull Request was created by @perrotta (Andrea Perrotta) for master. It involves the following packages:
@micsucmed, @nothingface0, @emanueleusai, @clacaputo, @cmsbuild, @pmandrik, @syuvivida, @tjavaid, @mandrenguyen, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
it may help to quote the warning. Apparently the issue is in the calling code not the actual implementation here. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3a772b/33897/summary.html Comparison SummarySummary:
|
+1 |
12efc98
to
3692913
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42373/36416
|
Pull request #42373 was updated. @micsucmed, @nothingface0, @emanueleusai, @clacaputo, @pmandrik, @syuvivida, @tjavaid, @mandrenguyen, @rvenditti can you please check and sign again. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3a772b/33996/summary.html Comparison SummarySummary:
|
+1 |
+1 |
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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
@perrotta @slava77 Any chance for a proper fix of this warning? Here is the log file: link
|
@iarspider the caller code in https://github.com/cms-sw/cmssw/blob/master/CommonTools/TrackerMap/src/TrackerMap.cc#L491 looks for the correct indices, they being limited by boudaries correctly coded as constexpr. I think that the compiler complains because it tries every possible output value of the
(where I'd use |
@perrotta thanks! |
would the warning go away if we put an assert there? |
out of curiosity, can someone remind me if a recipe exists to get |
I think so... |
PR description:
The possibility to return -1 from function
nlayer(int det, int part, int lay)
(which will never happen in practice, given its fixed input parameters) is generating build warnings in the IBs.I imagine that if we return a non-negative number in that anyhow impossible case, those warnings can disappear.
EDIT: triggered by comment #42373 (comment) I reverted the modification of the return value in the
nlayer
function. I am not sure any more that the other change applied here, i.e. the loop boundaries defined asconstexpr
instead of being variables, will be enough to shut up the build warning: in any case I didn't want to add further useless checks in the caller code.While doing so, I could not resist and applied a few very simple clean ups to the code. Therefore, l don't close this PR, but admittently it has a rather low priority...
PR validation:
It builds. No changes expected