- Tool: Parasoft C/C++test 2025.2.0 (Standard)
- Install path:
/opt/parasoft/cpptest_professional-2025.2.0-linux.x86_64 - Properties file:
/home/dx/cpptestcli.properties(local node-locked license) - Compiler: gcc_13-64
- Config:
builtin://Recommended Rules
cd /home/dx/src/demo-eclipse
make clean/opt/parasoft/cpptest_professional-2025.2.0-linux.x86_64/bin/cpptesttrace make -j8This intercepts all compiler/linker invocations and generates cpptestscan.bdf in the project directory.
/opt/parasoft/cpptest_professional-2025.2.0-linux.x86_64/bin/cli/cpptestcli \
-config "builtin://Recommended Rules" \
-compiler gcc_13-64 \
-input cpptestscan.bdf \
-property /home/dx/cpptestcli.properties \
-report /tmp/cpptest-report- HTML report:
/tmp/cpptest-report/report.html - XML report:
/tmp/cpptest-report/report.xml - Metrics:
/tmp/cpptest-report/metrics.xml
7 violations found:
| # | Rule | File | Line | Description |
|---|---|---|---|---|
| 1 | BD-PB-ARRAY | main.cpp | 88 | Array out of bounds — accessing numbers[4] on a 3-element array |
| 2 | BD-PB-CC | main.cpp | 25 | Dead condition — p == 0 always evaluates to false |
| 3 | BD-PB-CC | ATM.cpp | 13 | Dead condition — myCurrentAccount check always true |
| 4 | BD-PB-ZERO | main.cpp | 35 | Division by zero — numberOfEmployees may be zero |
| 5 | BD-PB-ZERO | main.cpp | 19 | Division by zero — daysWorkedInPassedMonth may be zero |
| 6 | OPT-14 | ATM.cpp | 11 | password parameter passed by value instead of const reference |
| 7 | OPT-14 | Bank.cpp | 15 | password parameter passed by value instead of const reference |
- The 2025.x installs are Standard edition (not Professional), so
-data(workspace) option is not available. - Standard edition uses
-input <bdf>instead of-data <workspace> -bdf <bdf>. - The 2025.2.0 cpptesttrace generates
cpptestscan.bdf(notcpptesttrace.bdf).