diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index a219be667..66146a119 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -25,12 +25,12 @@ jobs: - name: run cppcheck and check for errors run: | cppcheck --version - cppcheck --force --error-exitcode=1 --language=c++ --std=c++20 --enable=warning,performance,portability --suppress=memleak --check-level=exhaustive . + cppcheck --force --error-exitcode=1 --language=c++ --std=c++20 --enable=warning,performance,portability --suppress=memleak --suppress=passedByValue --check-level=exhaustive . - name: show cppcheck style suggestions run: | cppcheck --version - cppcheck --force --language=c++ --std=c++20 --enable=style --suppress=knownConditionTrueFalse --check-level=exhaustive . + cppcheck --force --language=c++ --std=c++20 --enable=style,performance --suppress=knownConditionTrueFalse --check-level=exhaustive . clang-format: runs-on: ubuntu-24.04 diff --git a/grid.cc b/grid.cc index 17a67d2a1..43ce58dc5 100644 --- a/grid.cc +++ b/grid.cc @@ -1484,10 +1484,10 @@ auto get_poscoordpointnum(const double pos, const double time, const int axis) - return n_r; } } - assert_always(false); - } else { - assert_always(false); } + + assert_always(false); + return -1; } constexpr auto get_gridcoords_from_xyz(const std::array pos_xyz) -> std::array { diff --git a/sn3d.h b/sn3d.h index 927a210c7..254d8fe90 100644 --- a/sn3d.h +++ b/sn3d.h @@ -102,7 +102,7 @@ inline thread_local auto gslworkspace = #define __artis_assert(e) \ { \ const bool assertpass = static_cast(e); \ - assert(assertpass) \ + assert(assertpass); \ } #else