[x] I signed and emailed the appropriate Contributor License Agreement to GSFC-SoftwareRelease@mail.nasa.gov and copied cfs-program@lists.nasa.gov.
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.
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.