静态代码分析:
右击需要分析的工程,选择菜单“SylixOS Code Static Analysis→Run Code Static Analysis” 可分析工程源码。选中“Console→cppcheck”标签页可查看分析过程,如下图。
静态代码分析的内容包括:
Undefined behaviour
- Dead pointers
- Division by zero
- lnteger overflows
- lnvalid bit shift operands
- lnvalid conversions
- lnvalid usage of .S.ML.
- Memory management
- Null pointer dereferences
- out of bounds checking
- Uninitialized variables
- Writing const data