Skip to content

Commit

Permalink
Fix nasa#49, aligned buffer for all test commands
Browse files Browse the repository at this point in the history
Where ever a unit test is generating a buffer on the stack to send to a
command processing function, this typically needs to be represented as
a CFE_SB_Buffer_t* pointer, which by definition is supposed to be
aligned to the worst-possible case, which may be greater than the
alignment requirement of the actual command type.

To avoid warnings when converting between types, use a union to ensure
the stack object meets the alignment requirements for CFE_SB_Buffer_t.

Furthermore, ensure all buffers instantiated on the stack are cleared
(memset to 0) before operating on them or passing them to a CF function.
  • Loading branch information
jphickey committed Dec 1, 2021
1 parent 7b99b91 commit 0e173f9
Showing 1 changed file with 701 additions and 456 deletions.
Loading

0 comments on commit 0e173f9

Please sign in to comment.