nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Fix #229, correct cast alignment warnings #230

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

Describe the contribution Most of these are fixable by adding an intermediate "void *" cast.

For the case of casting to the "bplib_mpool_block_content_t" type, which occurs somewhat frequently in the mpool logic, use the cast function to do this conversion. This reduces the number of times this complexity occurs in the source.

Changing this exposed another issue with the check for "bplib_mpool_is_any_content_node()", in that it did not include all the block types for which this is valid - api was not included. This is also corrected here.

Fixes #229

Testing performed Build and run all tests

Expected behavior changes No major impact - except a minor tweak to the bplib_mpool_is_any_content_node() call such that API nodes will now return true.

System(s) tested on Debian Bookworm

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

jphickey commented 1 year ago

Reviewed and approved at 2023-01-25 CCB