-
Notifications
You must be signed in to change notification settings - Fork 121
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
Init variable to avoid "may be used uninitialized" warning #2114
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2114 +/- ##
=======================================
Coverage 78.92% 78.92%
=======================================
Files 610 610
Lines 105121 105123 +2
Branches 14904 14902 -2
=======================================
+ Hits 82967 82971 +4
+ Misses 21503 21500 -3
- Partials 651 652 +1 ☔ View full report in Codecov by Sentry. |
9424cfa
to
a904cb8
Compare
crypto/fipsmodule/ec/ec_montgomery.c
Outdated
|
||
// Initialize variables to avoid "may be used uninitialized" warning. | ||
// https://github.com/aws/aws-lc/issues/1185 | ||
EC_FELEM delta = {{0}}, gamma = {{0}}, beta = {{0}}, ftmp = {{0}}, ftmp2 = {{0}}, tmptmp = {{0}}, alpha = {{0}}, fourbeta = {{0}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: at 134 characters, this line has gotten a little long. you might want to break it up into 2 lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Will. Addressed.
Previous discussion here: #1185
Similar issues here: 305ec03
Similar issues here: d0501c5#diff-6fde57725bf74f073ccac9d404387d74a39824fbc2465a02cfe37e86e679bbe8R34
Causes CI fails
Issues:
Resolves #P188618529
Description of changes:
Zero variables before use.
Call-outs:
The fail only occurs for gcc-12 with ubuntu2204 on x86_64.
Only variables
|ftmp2|
and|fourbeta|
are caught as maybe uninitializederror: 'var_name' may be used uninitialized [-Werror=maybe-uninitialized]
.Testing:
CI tests.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.