Fix #3, use sizeof() for header sizes. #23
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
sizeof()
will keep this tool in sync if the size of the CFE file or table header should ever change.Fixes #3
Testing performed
Run the tool and confirm that
skipSize
is unchanged in practice (still 116).Expected behavior changes
None
System(s) tested on
Ubuntu 20.04
Additional context
This does implicitly restrict this tool to the CFE build environment where these headers (common_types.h, cfe_fs_extern_typedefs,h, and cfe_tbl_extern_typedefs.h) are available. As a result this will no longer be buildable as a fully standalone/external tool. Based on #3 (comment) this is intended/acceptable but I figured it was worth noting again.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.