1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Enforcing certain data structure explicit paddings.

Implicit paddings have undefined values in C. We want the eattr blocks
to be comparable by memcmp and eattrs settable directly by structrure
literals. This check ensures that all paddings in eattr and bval are
explicit and therefore zeroed in all literals.
This commit is contained in:
Maria Matejka
2022-04-14 16:51:18 +02:00
parent c1194ab7ed
commit 1d309c4ce6
9 changed files with 139 additions and 9 deletions

View File

@@ -144,6 +144,8 @@ typedef struct eattr {
byte fresh:1; /* An uncached attribute (e.g. modified in export filter) */
byte undef:1; /* Explicitly undefined */
PADDING(unused, 0, 4);
union bval u;
} eattr;