-
Notifications
You must be signed in to change notification settings - Fork 17
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
switches with no break? #24
Comments
The behavior is intended: bcval is initialized to 0, so cases bcNaturalSpline and bcClamped use this initial condition. Cases bcApproximatedSecondDerivative and bcApproximatedSlope differ from bcNaturalSpline and bcClamped, respectively, with only a change in the value of bcval in the formula. You might get verbose warnings depending on compiler flags, but it should be harmless. Nevertheless, if you tell me the warnings, those could be investigated. I also see a bug on L139. The left-hand side should be ecval, not bcval. I will fix that with a PR at the same time I investigate the warnings if you mention them. |
Thanks @usarica for the quick reply. The warning is the one documented here: |
I am not sure whether the issue is still being considered - in case it is still ongoing, @namapane would you please let us know? Otherwise, I will close this issue. |
As far as I can tell, the code would still produce a warning. My suggestion is still to follow the gcc prescription adding: I can make a PR for that, if you wish. |
Dear MELA developers,
While checking compilation warnings, I noticed this switch() where some of the
case
do not include abreak
:https://github.com/JHUGen/JHUGenMELA/blob/master/MELA/src/MELANCSplineCore.cc#L94-L101
Is this really intended?
The effect here is that eg if
bcBegin==bcApproximatedSecondDerivative
then both thecase bcApproximatedSecondDerivative
and the following onecase bcApproximatedSlope
are executed, which loosk suspect.Same for
case bcClamped
andcase bcQuadratic
(both will be executed ifbcBegin==bcClamped
).HTH,
N.
The text was updated successfully, but these errors were encountered: