Skip to content

Static Code Analysis Declaration Not in Header Warning #530

Open

Description

@arielswalker

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
Ran two internal static code analysis tools that flags warnings of declaration not in header, missing external declaration, no previous declaration, and scope could be file static.

There were 1616 warnings from both tools. Went through the warnings to identify true positives warnings that should be fixed. Tool 1 has 41 unique warnings, tool 2 has 34 warnings, and both tools share 184 warnings. Other warnings were marked as won't fixed because warnings were in auto-generated build files and unit test suites, or because the flagged variables intentionally use external linkage to act as dynamic hooks for the CMake build system, ground table-generation tools, and mission linker overrides.

The 259 warnings that should be resolved span across:

  • cfe - 76 warnings
  • osal - 37 warnings
  • psp - 50 warnings
  • sample_lib - 1 warnings
  • cf - 14 warnings
  • cs - 21 warnings
  • ci_lab - 3 warnings
  • ds - 25 warnings
  • hk - 6 warnings
  • hs - 5 warnings
  • lc - 12 warnings
  • to_lab - 5 warnings
  • sch_lab - 4 warnings

To Reproduce
Run the internal static analysis tools.

Expected behavior
Resolve errors or mark them as will not fix.

Code snips

  1. apps/cf/fsw/src/cf_cfdp_r.c 884
  2. apps/cf/fsw/src/cf_cfdp_r.c 859
  3. apps/cf/fsw/src/cf_cfdp_r.c 948
  4. apps/cf/fsw/src/cf_cfdp_r.c 974
  5. apps/cf/fsw/src/cf_cfdp_r.c 926
  6. apps/cf/fsw/src/cf_cfdp_s.c 775
  7. apps/cf/fsw/src/cf_cfdp_s.c 666
  8. apps/cf/fsw/src/cf_cfdp_s.c 809
  9. apps/cf/fsw/src/cf_cfdp_s.c 691
  10. apps/cf/fsw/src/cf_cfdp_s.c 720
  11. apps/cf/fsw/src/cf_cmd.c 494
  12. apps/cf/fsw/src/cf_cmd.c 464
  13. apps/cf/fsw/src/cf_cmd.c 1350
  14. apps/cf/fsw/src/cf_cmd.c 890

System observed on:
Internal static code analysis tool, RedHat, cFS dev

Reporter Info
Ariel Walker, MCSG TECH.

Activity

  1. self-assigned this
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions