diff options
author | Thomas Haller <thaller@redhat.com> | 2020-07-30 14:07:57 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-08-05 10:22:10 +0200 |
commit | 5150e45fccb4436f49158244848910f4a4c45914 (patch) | |
tree | 2bbfc0a9be17df2a74763e1613cf9d5e55fe93ad | |
parent | 26d768a2b670e8f98253e2958e8d0d1017d8f4ee (diff) | |
download | NetworkManager-5150e45fccb4436f49158244848910f4a4c45914.tar.gz |
shared/tests: add static assert to ensure proper alignment of NMIPAddr struct
-rw-r--r-- | shared/nm-glib-aux/tests/test-shared-general.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/tests/test-shared-general.c b/shared/nm-glib-aux/tests/test-shared-general.c index 02b2f4e1ea..37d6618ad8 100644 --- a/shared/nm-glib-aux/tests/test-shared-general.c +++ b/shared/nm-glib-aux/tests/test-shared-general.c @@ -25,6 +25,11 @@ G_STATIC_ASSERT (NM_AF_INET_SIZE == sizeof (in_addr_t)); G_STATIC_ASSERT (NM_AF_INET_SIZE == sizeof (struct in_addr)); G_STATIC_ASSERT (NM_AF_INET6_SIZE == sizeof (struct in6_addr)); +G_STATIC_ASSERT (4 == _nm_alignof (in_addr_t)); +G_STATIC_ASSERT (4 == _nm_alignof (struct in_addr)); +G_STATIC_ASSERT (4 == _nm_alignof (struct in6_addr)); +G_STATIC_ASSERT (4 == _nm_alignof (NMIPAddr)); + /*****************************************************************************/ static void |