Skip to content

Fix #98, remove unused HK table type aliases - #100

Open
sylvesterkaczmarek wants to merge 1 commit into
nasa:devfrom
sylvesterkaczmarek:fix-98-unused-table-types
Open

sylvesterkaczmarek wants to merge 1 commit into
nasa:devfrom
sylvesterkaczmarek:fix-98-unused-table-types

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Checklist

  • Reviewed the HK and top-level cFS contributing guides.
  • Contributor License Agreement completion has not been verified for this submission.

Contribution

Fixes #98.

Remove the three unused aliases identified in the report: HK_RuntimeTable_Array_t, hk_copy_table_entry_t, and hk_runtime_tbl_entry_t. Repository-wide exact-name searches found each only at its declaration before the change and no remaining references afterward.

Retain the canonical HK_CopyTableEntry_t and HK_RuntimeTableEntry_t structures, the actively used HK_CopyTable_Array_t, and the public hk_tbl.h include wrapper. No table entry fields, command/telemetry structures, or runtime logic change.

Compatibility

This intentionally retires two legacy compatibility aliases and one unused array alias. Downstream table sources still using hk_copy_table_entry_t or hk_runtime_tbl_entry_t must use HK_CopyTableEntry_t or HK_RuntimeTableEntry_t, respectively. A downstream HK_RuntimeTable_Array_t declaration can use HK_RuntimeTableEntry_t[HK_COPY_TABLE_ENTRIES]. No such downstream usage is assumed to have been audited beyond this repository.

Testing performed

Built the HK application module and all four HK unit-test executables against unchanged dev and again with the patch. All four passed both times. The six MD test executables in the same test mission also passed on both runs: 10/10 total.

cmake -S cfe -B build-rotationh -DMISSIONCONFIG=rotationh \
  -DSIMULATION=native -DENABLE_UNIT_TESTS=ON
cmake --build build-rotationh --parallel 4
cmake --build build-rotationh/native/default --parallel 4 --target hk \
  coverage-hk-hk_app-testrunner coverage-hk-hk_cmds-testrunner \
  coverage-hk-hk_utils-testrunner coverage-hk-hk_dispatch-testrunner
ctest --test-dir build-rotationh/native/default --output-on-failure \
  --no-tests=error -R '^coverage-hk-'

git diff --check passed. This declaration-only cleanup introduces no new executable behavior; the existing compiled application tests provide regression coverage. HK baseline: 0dc16b7a7bab71747b9c063cf405ad59a65a40a5.

System tested

Debian 12 ARM64 in Docker on an Apple Silicon Mac, GCC 12.2.0, CMake 3.31.6. The isolated test mission enables HK and MD, unit tests, and the standard non-EDS interfaces. Its configuration and build outputs are outside this PR.

  • cFE: 5dd74afa85e5ed5e8c1ed4129281d21611f8d699
  • OSAL: 5befd8e9f6c62b44bb7ff4c15db8629c0e00efa0
  • PSP: 36c24cb953b047ab5525240579aeb06adf5ac11f

The complete cFS runtime, flight hardware, EDS configuration, and table-file generation were not exercised. The original MISRA analysis tool was not run, and this is not a claim of full MISRA compliance. No third-party code, dependency, or workflow changes.

Contributor

Sylvester Kaczmarek, Personal.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Could someone review the unused table-type cleanup when time allows?

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.

HK Unused type declarations

2 participants