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

Re-enable -Wsometimes-uninitialized for clang #83922

Merged
merged 2 commits into from
Mar 23, 2025

Conversation

thughes
Copy link
Contributor

@thughes thughes commented Jan 13, 2025

All warnings in the code base have been resolved.

@thughes thughes changed the title Re-enable -Wsometimes-uninitialized for clang Re-enable -Wsometimes-uninitialized for clang Jan 13, 2025
@thughes thughes force-pushed the fix-sometimes-uninitialized branch 2 times, most recently from c1b26fa to 14bea22 Compare January 17, 2025 23:01
@thughes thughes marked this pull request as ready for review January 22, 2025 22:36
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from 14bea22 to e70b196 Compare January 24, 2025 19:52
@thughes thughes requested a review from Thalley January 24, 2025 19:52
Thalley
Thalley previously approved these changes Jan 24, 2025
jhedberg
jhedberg previously approved these changes Jan 24, 2025
nordicjm
nordicjm previously approved these changes Jan 28, 2025
@thughes
Copy link
Contributor Author

thughes commented Jan 28, 2025

@stephanosio Looks like I need your approval. Thanks!

@thughes
Copy link
Contributor Author

thughes commented Jan 31, 2025

@tejlmand I'm not sure about the exact process, but it looks like you'd be considered a MAINTAINER for this change.

Is it possible to make yourself the assignee or do I need to wait for @stephanosio?

@thughes thughes force-pushed the fix-sometimes-uninitialized branch from e70b196 to 418188a Compare February 4, 2025 19:16
tejlmand
tejlmand previously approved these changes Feb 6, 2025
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from 034413b to d5ab040 Compare February 8, 2025 00:56
@thughes thughes dismissed stale reviews from jhedberg, Thalley, tejlmand, and nordicjm via 2c76ed2 February 11, 2025 19:38
@thughes thughes force-pushed the fix-sometimes-uninitialized branch 3 times, most recently from b402ed6 to 9e53498 Compare February 12, 2025 22:49
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from 9e53498 to 9c1362a Compare February 20, 2025 17:42
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from 9c1362a to ca39e61 Compare March 10, 2025 22:26
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from ca39e61 to 00b1a60 Compare March 18, 2025 21:28
Building libraries.cmsis_dsp.distance with clang warns:

tests/lib/cmsis_dsp/distance/src/f32.c:99:3: error: variable 'val' is
used uninitialized whenever switch default is taken
[-Werror,-Wsometimes-uninitialized]
                default:
                ^~~~~~~
tests/lib/cmsis_dsp/distance/src/f32.c:104:19: note: uninitialized use
occurs here
                output[index] = val;
                                ^~~
tests/lib/cmsis_dsp/distance/src/f32.c:57:16: note: initialize the
variable 'val' to silence this warning
                float32_t val;
                             ^
                              = 0.0

Not really necessary since there is a zassert_unreachable, but doesn't
hurt to initialize the variable.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
@thughes thughes force-pushed the fix-sometimes-uninitialized branch 2 times, most recently from a3801ef to 7b498d0 Compare March 21, 2025 22:04
All warnings in the code base have been resolved.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
@thughes thughes force-pushed the fix-sometimes-uninitialized branch from 7b498d0 to 17760aa Compare March 21, 2025 22:36
@kartben kartben merged commit 53f17c1 into zephyrproject-rtos:main Mar 23, 2025
21 checks passed
@thughes thughes deleted the fix-sometimes-uninitialized branch March 24, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants