Skip to content
Commit df3d4d27 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Anas Nashif
Browse files

tests: kernel: sleep: Fix uninitialised variable warning



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: default avatarStephanos Ioannidis <root@stephanos.io>
parent a2e25696
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment