Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: lib: cmsis_dsp: Fix -Wsometimes-uninitialized warning
Building with clang warns: tests/lib/cmsis_dsp/distance/src/u32.c:82:3: error: variable 'val' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ tests/lib/cmsis_dsp/distance/src/u32.c:87:19: note: uninitialized use occurs here output[index] = val; ^~~ tests/lib/cmsis_dsp/distance/src/u32.c:47:16: note: initialize the variable 'val' to silence this warning float32_t val; ^ = 0.0 Hitting the default switch will assert, so this won't cause any problems as written, but it doesn't hurt to initialize the variable. Signed-off-by: Tom Hughes <tomhughes@chromium.org>
- Loading branch information