Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cppcheck integration #6

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Conversation

dafeda
Copy link
Collaborator

@dafeda dafeda commented Jan 25, 2025

Adding cppcheck in separate PR because it fails.

cppcheck --enable=style,portability,performance,warning \
           --library=posix \
           --inline-suppr \
           --project=compile_commands.json \
           --error-exitcode=1 \
           --suppressions-list=../cppcheck/suppressions.txt \
           --verbose \
           --template="{file}:{line} [{severity}] {message}" \
           2>&1
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:3).11.11/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.11/x6[4](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:4)/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.11/x64/lib
Checking /home/runner/work/si4ti/si4ti/timeshift/src/timeshift.cpp ...
Defines:NDEBUG=1
Undefines:
Includes:
Platform:native
Checking /home/runner/work/si4ti/si4ti/timeshift/src/timeshift.cpp: NDEBUG=1...
/home/runner/work/si4ti/si4ti/timeshift/src/timeshift.cpp:0 [information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner::vintages' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner::diagonals' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner::traces' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner::dims' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
/home/runner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:[5](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:5)67 [style] Redundant assignment of 'derived' to itself.
/home/runner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:575 [style] Redundant assignment of 'trace' to itself.
1/7 files checked 14% done
Checking /home/runner/work/si4ti/si4ti/timeshift/src/apply_timeshift.cpp ...
Defines:NDEBUG=1
Undefines:
Includes:
Platform:native
Checking /home/runner/work/si4ti/si4ti/timeshift/src/apply_timeshift.cpp: NDEBUG=1...
/home/runner/work/si4ti/si4ti/timeshift/src/apply_timeshift.cpp:0 [information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
2/7 files checked 28% done
Checking /home/runner/work/si4ti/si4ti/timeshift/test/testsuite.cpp ...
Defines:NDEBUG=1
Undefines:
Includes: -I/home/runner/work/si4ti/si4ti/timeshift/src/
Platform:native
Checking /home/runner/work/si4ti/si4ti/timeshift/test/testsuite.cpp: NDEBUG=1...
3/7 files checked 42% done
Checking /home/runner/work/si4ti/si4ti/timeshift/test/timeshift.cpp ...
Defines:NDEBUG=1
Undefines:
Includes: -I/home/runner/work/si4ti/si4ti/timeshift/src/
Platform:native
Checking /home/runner/work/si4ti/si4ti/timeshift/test/timeshift.cpp: NDEBUG=1...
/home/runner/work/si4ti/si4ti/timeshift/test/timeshift.cpp:0 [information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:[6](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:6)32 [warning] Member variable 'Si4tiPreconditioner < double >::vintages' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner < double >::diagonals' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner < double >::traces' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
Warning: ner/work/si4ti/si4ti/timeshift/src/timeshift.hpp:632 [warning] Member variable 'Si4tiPreconditioner < double >::dims' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
4/[7](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:7) files checked 57% done
Checking /home/runner/work/si4ti/si4ti/impedance/src/impedance.cpp ...
Defines:NDEBUG=1
Undefines:
Includes:
Platform:native
Checking /home/runner/work/si4ti/si4ti/impedance/src/impedance.cpp: NDEBUG=1...
/home/runner/work/si4ti/si4ti/impedance/src/impedance.cpp:0 [information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
5/7 files checked 71% done
Checking /home/runner/work/si4ti/si4ti/impedance/test/testsuite.cpp ...
Defines:NDEBUG=1
Undefines:
Includes: -I/home/runner/work/si4ti/si4ti/impedance/src/
Platform:native
Checking /home/runner/work/si4ti/si4ti/impedance/test/testsuite.cpp: NDEBUG=1...
6/7 files checked [8](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:8)5% done
Checking /home/runner/work/si4ti/si4ti/impedance/test/impedance.cpp ...
Defines:NDEBUG=1
Undefines:
Includes: -I/home/runner/work/si4ti/si4ti/impedance/src/
Platform:native
Checking /home/runner/work/si4ti/si4ti/impedance/test/impedance.cpp: NDEBUG=1...
/home/runner/work/si4ti/si4ti/impedance/test/impedance.cpp:0 [information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
7/7 files checked [10](https://github.com/dafeda/si4ti/actions/runs/12964180604/job/36162594015#step:9:10)0% done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant