Skip to content

Cast-align warning in sb_UT.c #911

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.

/home/jhageman/cFS-GitHub/cfe/fsw/cfe-core/unit-test/sb_UT.c: In function ‘Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy’:
/home/jhageman/cFS-GitHub/cfe/fsw/cfe-core/unit-test/sb_UT.c:3330:33: warning: cast increases required alignment of target type [-Wcast-align]
 3330 |                                 (CFE_SB_ZeroCopyHandle_t *) &TlmPkt);
      |                                 ^
/home/jhageman/cFS-GitHub/cfe/fsw/cfe-core/unit-test/sb_UT.c: In function ‘Test_SendMsg_NoSubscribers_ZeroCopy’:
/home/jhageman/cFS-GitHub/cfe/fsw/cfe-core/unit-test/sb_UT.c:3365:33: warning: cast increases required alignment of target type [-Wcast-align]
 3365 |                                 (CFE_SB_ZeroCopyHandle_t *) &TlmPkt);

Describe the solution you'd like
Resolve warnings

Describe alternatives you've considered
None

Additional context
Ubuntu 20.04 w/ cast-align=strict

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions