A header changes the packing of structs with #pragma pack and does not restore it
What it finds
#pragma pack(1) in a header without #pragma pack() or a matching pop at its end: every struct declared after the include, in headers of other libraries too, gets the new packing, and code compiled with and without the header disagrees on layouts.
From the rule's source, pack_pragma_not_restored.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/c:pack-pragma-not-restored" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/c:pack-pragma-not-restored] reason="..."tx0 explain tx0/c:pack-pragma-not-restored shows the same in the terminal. Found a false positive? Report it.