diff options
| author | Michael Biebl <biebl@debian.org> | 2022-05-04 15:35:24 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-05-04 15:35:24 +0200 |
| commit | 9959fdb2e8ddd06f2161798ca0a39c77d67c652d (patch) | |
| tree | 2ce24a336d2b1c5fd5dec3090db312eded6c78ba /src/core/platform/tests/test-common.c | |
| parent | 8c623dddbdebe354cb94bfc559a5371a14865317 (diff) | |
New upstream version 1.37.92 upstream/1.37.92
Diffstat (limited to 'src/core/platform/tests/test-common.c')
| -rw-r--r-- | src/core/platform/tests/test-common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c index 9053d351..d7fed220 100644 --- a/src/core/platform/tests/test-common.c +++ b/src/core/platform/tests/test-common.c @@ -239,8 +239,9 @@ _nmtstp_platform_ip_addresses_assert(const char *filename, } } if ((IS_IPv4 ? force_exact_4 : force_exact_6) && nm_g_ptr_array_len(plat_addrs) > 0) { - char sbuf[sizeof(_nm_utils_to_string_buffer)]; + char sbuf[NM_UTILS_TO_STRING_BUFFER_SIZE]; + NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER g_error("%s:%d: %u IPv%c addresses found on ifindex %d that should not be there (one " "is %s)", filename, @@ -252,6 +253,7 @@ _nmtstp_platform_ip_addresses_assert(const char *filename, NMP_OBJECT_TO_STRING_PUBLIC, sbuf, sizeof(sbuf))); + NM_PRAGMA_WARNING_REENABLE } } } @@ -580,6 +582,7 @@ _nmtstp_assert_ip4_route_exists(const char *file, if (c != c_exists && c_exists != -1) { char sbuf[NM_UTILS_INET_ADDRSTRLEN]; + NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER g_error("[%s:%u] %s(): The ip4 route %s/%d metric %u tos %u shall exist %u times, but " "platform has it %u times", file, @@ -591,6 +594,7 @@ _nmtstp_assert_ip4_route_exists(const char *file, tos, c_exists, c); + NM_PRAGMA_WARNING_REENABLE } return r; @@ -673,6 +677,7 @@ _nmtstp_assert_ip6_route_exists(const char *file, char s_src[NM_UTILS_INET_ADDRSTRLEN]; char s_network[NM_UTILS_INET_ADDRSTRLEN]; + NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER g_error("[%s:%u] %s(): The ip6 route %s/%d metric %u src %s/%d shall exist %u times, but " "platform has it %u times", file, @@ -685,6 +690,7 @@ _nmtstp_assert_ip6_route_exists(const char *file, src_plen, c_exists, c); + NM_PRAGMA_WARNING_REENABLE } return r; @@ -2772,13 +2778,7 @@ nmtstp_acd_defender_new(int ifindex, in_addr_t ip_addr, const NMEtherAddr *mac_a n_acd_get_fd(defender->nacd, &fd); g_assert_cmpint(fd, >=, 0); - defender->source = nm_g_source_attach(nm_g_unix_fd_source_new(fd, - G_IO_IN, - G_PRIORITY_DEFAULT, - _l3_acd_nacd_event, - defender, - NULL), - NULL); + defender->source = nm_g_unix_fd_add_source(fd, G_IO_IN, _l3_acd_nacd_event, defender); return defender; } |