nasa / LC

The Core Flight System (cFS) Limit Checker (LC) application.
Apache License 2.0
30 stars 21 forks source link

Fix #72, correct use of union type #73

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

Checklist (Please check before submitting)

Describe the contribution Use ISO C standard value conversion, do not rely on platform-dependent union access.

Fixes #72

Testing performed Build and run all tests, confirm LC_GetSizedWPData() call is still working as expected.

Expected behavior changes None

System(s) tested on Debian

Additional context Assigning (by value) between signed and unsigned values is defined by ISO C and results are specified. In contrast, writing to one union member and reading from another does not have specified results (although on a twos complement machine with typical implementation it happens to produce the same result...)

Contributor Info - All information REQUIRED for consideration of pull request Joseph Hickey, Vantage Systems, Inc.