Skip to content

Conversation

stephanosio
Copy link
Member

This commit sets an initial value of 0 for the res variable, whose
pointer is passed to other functions and is not directly assigned
within the calling function.

Note that, when the test completes successfully, the value of the res
variable should be set to 423 (the value of set_res).

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

Signed-off-by: Stephanos Ioannidis root@stephanos.io

This commit sets an initial value of 0 for the `res` variable, whose
pointer is passed to other functions and is not directly assigned
within the calling function.

Note that, when the test completes successfully, the value of the `res`
variable should be set to `423` (the value of `set_res`).

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

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
@fabiobaltieri fabiobaltieri merged commit bde270b into zephyrproject-rtos:main Jul 29, 2022
@chen-png
Copy link

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.

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.

6 participants