summaryrefslogtreecommitdiff
path: root/src/test/test-util.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-12-14 23:22:02 +0100
committerMichael Biebl <biebl@debian.org>2017-12-14 23:22:02 +0100
commit52ad194e0b816b8273dd8d0fea3e6d467f6ca34e (patch)
tree1a3b3117e015f200ca0ce23f5ad27be6d0a7b0fb /src/test/test-util.c
parentf5e65279187b6aa0c0c5a00b14dca9eab441ffb2 (diff)
downloadsystemd-52ad194e0b816b8273dd8d0fea3e6d467f6ca34e.tar.gz
New upstream version 236
Diffstat (limited to 'src/test/test-util.c')
-rw-r--r--src/test/test-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c
index f8bf0cb875..2124511bf0 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
@@ -104,6 +105,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 +128,8 @@ static void test_container_of(void) {
v1) == &myval);
}
+#pragma GCC diagnostic pop
+
static void test_div_round_up(void) {
int div;