mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
test-util: silence clang warning about unaligned access
This commit is contained in:
parent
3f6914175c
commit
09571e3ffc
@ -104,6 +104,11 @@ static void test_max(void) {
|
||||
assert_se(CLAMP(CLAMP(0, -10, 10), CLAMP(-5, 10, 20), CLAMP(100, -5, 20)) == 10);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifdef __clang__
|
||||
# pragma GCC diagnostic ignored "-Waddress-of-packed-member"
|
||||
#endif
|
||||
|
||||
static void test_container_of(void) {
|
||||
struct mytype {
|
||||
uint8_t pad1[3];
|
||||
@ -122,6 +127,8 @@ static void test_container_of(void) {
|
||||
v1) == &myval);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
static void test_div_round_up(void) {
|
||||
int div;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user