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 Wmaybe-uninitialized in apps/regression/model/trigonometric_model… #2156

Closed

Conversation

serval2412
Copy link
Contributor

….cpp

Fixes these:
apps/regression/model/trigonometric_model.cpp: In member function ‘virtual void Regression::TrigonometricModel::specializedInitCoefficientsForFit(double*, double, Regression::Store*, int) const’:
apps/regression/model/trigonometric_model.cpp:194:40: warning: ‘xMin’ may be used uninitialized [-Wmaybe-uninitialized]
194 | double period = 2.0 * std::fabs(xMax - xMin);
| ~~~~~^~~~~~
apps/regression/model/trigonometric_model.cpp:187:10: note: ‘xMin’ was declared here
187 | double xMin, xMax, yMin, yMax;
| ^~~~
apps/regression/model/trigonometric_model.cpp:194:40: warning: ‘xMax’ may be used uninitialized [-Wmaybe-uninitialized]
194 | double period = 2.0 * std::fabs(xMax - xMin);
| ~~~~~^~~~~~
apps/regression/model/trigonometric_model.cpp:187:16: note: ‘xMax’ was declared here
187 | double xMin, xMax, yMin, yMax;
| ^~~~
apps/regression/model/trigonometric_model.cpp:190:32: warning: ‘yMin’ may be used uninitialized [-Wmaybe-uninitialized]
190 | modelCoefficients[0] = (yMax - yMin) / 2.0;
| ~~~~~~^~~~~~~
apps/regression/model/trigonometric_model.cpp:187:22: note: ‘yMin’ was declared here
187 | double xMin, xMax, yMin, yMax;
| ^~~~
apps/regression/model/trigonometric_model.cpp:190:32: warning: ‘yMax’ may be used uninitialized [-Wmaybe-uninitialized]
190 | modelCoefficients[0] = (yMax - yMin) / 2.0;
| ~~~~~~^~~~~~~
apps/regression/model/trigonometric_model.cpp:187:28: note: ‘yMax’ was declared here
187 | double xMin, xMax, yMin, yMax;
| ^~~~
LD epsilon.bin

@PiaNumworks
Copy link
Contributor

Thank you for your contribution!
We cherry-picked your changes in our private repository and integrated them for the next version of epsilon.

@PiaNumworks PiaNumworks closed this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants