mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user