]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-util.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / test / test-util.c
index f8bf0cb87598b4df1e64db1cb5f22babb46f1bac..2124511bf02a051b7b984546c6c8ba4488fc22e0 100644 (file)
@@ -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;