test-util: drop _packed_ attribute
gcc-9 warns: ../src/test/test-util.c:147:19: note: in expansion of macro ‘container_of’ 147 | assert_se(container_of(&myval.v1, struct mytype, v1) == &myval); | ^~~~~~~~~~~~ I don't think packing matters here for the test of container_of(), so let's just remove it.
This commit is contained in:
parent
e27b9aba30
commit
6b68c26824
|
@ -139,11 +139,11 @@ static void test_container_of(void) {
|
|||
uint64_t v1;
|
||||
uint8_t pad2[2];
|
||||
uint32_t v2;
|
||||
} _packed_ myval = { };
|
||||
} myval = { };
|
||||
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
assert_cc(sizeof(myval) == 17);
|
||||
assert_cc(sizeof(myval) >= 17);
|
||||
assert_se(container_of(&myval.v1, struct mytype, v1) == &myval);
|
||||
assert_se(container_of(&myval.v2, struct mytype, v2) == &myval);
|
||||
assert_se(container_of(&container_of(&myval.v2,
|
||||
|
|
Loading…
Reference in New Issue