Skip to content

Replace codec code-compatibility macros with direct calls to the new functions #227

@skliper

Description

@skliper

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
These were used to help transition the code from old endian dependent macros, but they obscure the fact values are being modified by taking address of the input. They also cause static analysis warnings on occasion as identified in #216.

Example:

CF/fsw/src/cf_codec.c

Lines 134 to 138 in d0b3e25

static inline void CF_Codec_Store_uint8(CF_CFDP_uint8_t *pdst, uint8 val)
{
pdst->octets[0] = val;
}
#define cfdp_set_uint8(dst, src) CF_Codec_Store_uint8(&(dst), src)

Describe the solution you'd like
Convert the code to use the functions directly, remove offending macros.

Describe alternatives you've considered
None

Additional context

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions