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

tests: kernel: sleep: Fix uninitialised variable warning #48457

Merged

Conversation

stephanosio
Copy link
Member

This commit sets an initial value of 0 for the elapsed_ms variable,
which may be used uninitialised when the while loop below does not
execute.

This fixes the "‘elapsed_ms’ may be used uninitialized" warning
generated by the GCC 12.

Signed-off-by: Stephanos Ioannidis [email protected]

This commit sets an initial value of 0 for the `elapsed_ms` variable,
which may be used uninitialised when the while loop below does not
execute.

This fixes the "‘elapsed_ms’ may be used uninitialized" warning
generated by the GCC 12.

Signed-off-by: Stephanos Ioannidis <[email protected]>
@stephanosio stephanosio requested a review from gmarull July 29, 2022 12:07
@nashif nashif merged commit df3d4d2 into zephyrproject-rtos:main Jul 29, 2022
@chen-png
Copy link
Collaborator

added a backport label for v3.1-branch, as this also will report same build warning on v3.1-branch with zephyr sdk 0.15.0.

@stephanosio
Copy link
Member Author

Zephyr SDK 0.15.0 is not supposed to work with any Zephyr versions below the upcoming 3.2.0 release and the main branch.

@chen-png
Copy link
Collaborator

we enabled hardware daily testing for v3.1-branch with Zephyr SDK 0.15.0, it worked well except for those same build warnings as the main branch before, so I want to cherry-pick those fixes.
So you mean that for v3.1-branch, we should still use the old SDK revision 0.14 rather then the latest 0.15.0, right?

@stephanosio
Copy link
Member Author

So you mean that for v3.1-branch, we should still use the old SDK revision 0.14 rather then the latest 0.15.0, right?

Yes.

@chen-png
Copy link
Collaborator

chen-png commented Sep 1, 2022

thanks for your explanation, I will still use sdk 0.14 for v3.1-branch testing and close those backport patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants