-
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-uninitialized variables in Alignment/OfflineValidation/macros/momentumBiasValidation.C #43775
Comments
assign Alignment/OfflineValidation |
New categories assigned: alca @saumyaphor4252,@perrotta,@consuegs you have been requested to review this Pull request/Issue and eventually sign? Thanks |
cms-bot internal usage |
A new Issue was created by @iarspider . @Dr15Jones, @sextonkennedy, @smuzaffar, @rappoccio, @makortel, @antoniovilela can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
@iarspider Of course, if we want to shut up the warning a whatever initial value can be given to those two variables, but nothing will change in the flow of the macro. |
@perrotta already correctly analyzed the situation at #43775 (comment). diff --git a/Alignment/OfflineValidation/macros/momentumBiasValidation.C b/Alignment/OfflineValidation/macros/momentumBiasValidation.C
index 06b3069a5a7..b48833be321 100644
--- a/Alignment/OfflineValidation/macros/momentumBiasValidation.C
+++ b/Alignment/OfflineValidation/macros/momentumBiasValidation.C
@@ -40,8 +40,8 @@ namespace eop {
double mean = f1->GetParameter(1);
double deviation = f1->GetParameter(2);
- double lowLim;
- double upLim;
+ double lowLim{mean - (2.0 * deviation)};
+ double upLim{mean + (2.0 * deviation)};
double newmean;
double degrade = 0.05; just to silence the warnings ;) |
In CMSSW_14_0_CPP20_X_2024-01-22-1100 IB, the following warnings about potentially uninitialized variables are emitted:
The text was updated successfully, but these errors were encountered: