Skip to content

Header guard typo in todimpl.h breaks native build #1039

@Liode01

Description

@Liode01

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
There is a typo in the header guard of the RTEMS stub file todimpl.h used for unit test coverage in the PSP module. The #ifndef directive checks for OVERRIDE_TOOIMPL_H, but the #define directive immediately following it uses OVERRIDE_TODIMPL_H (mismatch between the letter 'O' and 'D').
Since the build treats all warnings as errors (-Werror=header-guard), this typo causes the compilation to fail on a native Linux build.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the latest cFS bundle.
  2. Initialize and update all submodules.
  3. Run make native_std.prep
  4. Run make native_std.install.
  5. See compilation error during the build of coverage-pspmod-network_pc686_rtems-object.

Expected behavior
The build should complete successfully without header guard warnings. The macro name should be identical in both directives (e.g., OVERRIDE_TODIMPL_H for both #ifndef and #define).

Code snips
File: psp/unit-test-coverage/ut-stubs/override_inc/rtems/score/todimpl.h (Lines 20-21)

#ifndef OVERRIDE_TOOIMPL_H
#define OVERRIDE_TODIMPL_H

**System observed on:**
 - Hardware: x86_64 Virtual Machine (Oracle VirtualBox v7.2.8 r173730 on Windows host) - 2 Cores, 4GB RAM
 - OS: Ubuntu Linux 26.04 LTS (Guest)
 - cFS bundle v7.0.1-20-gc4c38ee

**Additional context**
This is the first time for me trying to run cFS, the error appeared while following the README.md Build and Run Quick Start. Changing #ifndef OVERRIDE_TOOIMPL_H to #ifndef OVERRIDE_TODIMPL_H solved the issue

**Reporter Info**
Pierluca De Felice, IGNIS Project - University of Napoli "Federico II"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions