Enable GCC builtin static analysis in Zephyr's static code analysis
(SCA) infra.
When this option is enabled GCC performs a static analysis and
can point problems like:
sample.c
+ int *j;
+
+ if (j != NULL) {
+ printf("j != NULL\n");
output:
${ZEPHYR_BASE}/samples/userspace/hello_world_user/src/main.c:30:12:
warning: use of uninitialized value 'j' [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]
30 | if (j != NULL) {
| ^
'main': events 1-2
|
| 25 | int *j;
| | ^
| | |
| | (1) region created on stack here
|......
| 30 | if (j != NULL) {
| | ~
| | |
| | (2) use of uninitialized value 'j' here
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
|
||
|---|---|---|
| .. | ||
| app | ||
| bintools | ||
| compiler | ||
| emu | ||
| flash | ||
| ide | ||
| linker | ||
| linker_script | ||
| makefile_exports | ||
| modules | ||
| reports | ||
| sca | ||
| toolchain | ||
| usage | ||
| util | ||
| cfb.cmake | ||
| extra_flags.cmake | ||
| gcc-m-cpu.cmake | ||
| gcc-m-fpu.cmake | ||
| gen_version_h.cmake | ||
| hex.cmake | ||
| kobj.cmake | ||
| mcuboot.cmake | ||
| package_helper.cmake | ||
| pristine.cmake | ||
| target_toolchain_flags.cmake | ||
| verify-toolchain.cmake | ||
| vif.cmake | ||