Repository navigation
fix: MISRA deviations - #3
Merged
Merged
Conversation
Reverted the memcpy pointer-copy workaround for Rule 11.5: it traded a well-defined pointer conversion for an object-representation copy with no standard guarantee across pointer types, evaded the checker rather than complying with the rule, and blinded cppcheck's dataflow (two spurious constParameterPointer suggestions on buffers that are written through the derived pointer). The casts are back, deviated inline with an @deviation rationale. Replaced the (void *) casts that silenced Rule 21.15 at 21 memcpy call sites with two internal helpers, ppack_member_write and ppack_member_read, which centralise the type-erased struct-member copies behind a single documented deviation each, plus one inline deviation for the deliberate F32 float/uint32_t pun. Call sites are now cast-free and Rule 21.15 remains live against any future direct memcpy in the file. Also: - added a _Static_assert that float is exactly 32 bits, an F32 wire-format prerequisite that was previously only documented - rewrote misra-deviations.txt for ppack (was copy-pasted from ucrc) and removed the stray ucrc tools/ reference from misra.toml - replaced the stale file-header deviation record in src/ppack.c with a summary of the misch-driven workflow - updated README, CONTRIBUTING and CHANGELOG to describe the misch audit and the three required-rule (21.15) deviations accurately
Owner
Author
|
Made use of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.