diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-01 23:06:27 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-01 23:06:27 +0100 |
commit | d7bce8428be248b120eabaab5d5c587e88a21ef7 (patch) | |
tree | 64dfeaf763aeb93d4737b6a85b660599b1589656 /src/test/test-util.c | |
parent | 22662de7edd00b87e5e8d8b4d76cda5a56344117 (diff) |
test-util: silence clang warning about unaligned access
Diffstat (limited to 'src/test/test-util.c')
-rw-r--r-- | src/test/test-util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c index 6e5f90756..655192990 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -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; |