Skip to content
Commit 28fc46ee authored by Andy Ross's avatar Andy Ross Committed by Ioannis Glaropoulos
Browse files

tests/kernel/sched/schedule_api: Fix static analysis volatile warning



We were testing the value of a volatile variable inside a zassert,
which static analysis doesn't like.  In principle, it might be
volatile because it's an MMIO register or something and the read is a
side effect, and an assertion will be optionally compiled.  (Except
here the value is just regular memory marked volatile for
threadsafety, and zassert will never be elided in a test, but the tool
doesn't know that).

Refactor a little so we always read the variable in a way the tool can
detect is consistent.

Fixes #18446

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent a47f0a35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment