Since GCC version 10, there has been a new option -fanalyzer for static analysis. It can make the CI pipeline more comprehensive. Also, the static analysis updates in GCC 11, but we cannot install the GCC 11 in ubuntu 20.04 straightforwardly right now, which is the GitHub workflow environment (see status-check.yaml). For this reason, we stay at the GCC 10. Close #117 Reference - https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html - https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10 - https://lwn.net/Articles/870290/ - https://developers.redhat.com/blog/2021/01/28/static-analysis-updates-in-gcc-11 - 7d73c3e9c5
7d73c3e9c5
Sparse[1] is a semantic parser for C language, it can find out the potential problem of the example code. [1] https://www.kernel.org/doc/html/latest/dev-tools/sparse.html
Cppcheck[1] is integrated into CI pipeline for running static analysis. However, Cppcheck is known to report false-positive, and we have to suppress some warnings in advance. [1] https://cppcheck.sourceforge.io/