static analysis using PVS
Created by: davydden
I did a static code analysis on Trilnos 12.8.1 with gcc 5.4.0 (build by Spack with
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON) using PVS for Linux. The results are
Total messages: 3907 Filtered messages: 1657
There are certainly some false positives, but I am sure that there are also those to be fixed. pvs_tasks.txt
Keep in mind that (from http://www.viva64.com/en/m/0036/)
It is important to understand that all files to be analyzed should be compiled. If your project actively uses code generation, then this project should be built before analysis, otherwise there may be errors during preprocessing.
Steps to reproduce
$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On <blah-blah-blah> $ make all -j8 $ pvs-studio-analyzer analyze -l PVS-Studio.lic -o pvs.log -j8 $ plog-converter -a GA:1,2 -t tasklist -o pvs_tasks.txt pvs.log
For a trial Linux license see http://www.viva64.com/en/b/0441/ .